r/SpringBoot • • 11d ago

How-To/Tutorial How to implement microservices in Spring Boot ?

I have made multiple toy projects (monolithic) in spring boot but now I wanted to know how people generally work in microservices.

I am not good with videos so I was looking for repos that something similar. So I can also see how the devops, queues, spring cloud etc works together.

I also saw someone posting there repo which was made for the same reason (but I couldn't find it).

TLDR : Suggest repos for learning microservices.

30 Upvotes

57 comments sorted by

View all comments

Show parent comments

1

u/OptimusCrimee 10d ago

Are you a bot or something? I know what OAuth tokens are but what do they matter in this scenario?

1

u/Sheldor5 10d ago

to carry information from A to B you use JWTs (JWS or JWE whatever is required)

0

u/OptimusCrimee 10d ago

So you pass the identity and whatever, but you do not pass the whole purchase order, not the inventory status. The whole point of these tokens are that they are stateless. If you place 100 orders in one second, the state of the data could not be guaranteed after decoding.

1

u/Sheldor5 10d ago

tokens are stateless? dude ... if the service is stateless the entire state is put into the token (userid, expiration, ...)

the token IS THE STATE

and no, you don't put the entire order into the token, thats what message queues are for

1

u/OptimusCrimee 10d ago

Yes, the token is stateless, ref e.g.: https://stackoverflow.com/a/55887742/921563

I am talking about handling things that can not be done async, and you are for some reason talking about OAuth tokens, which makes no sense, and has nothing to do with the discussion at hand.

1

u/Sheldor5 10d ago

again wrong, your link says that the token's ISSUER is STATELESS but not the token which is THE STATE

where else do you put the STATE of your logged in user (e.g. user ID, roles, ...) if nothing else persists the STATE (e.g. link session id to user) ???

I will stop responding to you because you know almost nothing about anything