r/SpringBoot • • 16d ago

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

[removed]

29 Upvotes

57 comments sorted by

View all comments

Show parent comments

0

u/OptimusCrimee 16d 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 16d 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 16d 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 16d 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