I've read many many articles saying that sessions violate statelessness regards to REST
.
If user logins the server, server gives session cookie(ssid) to the client, and stores the session data (user data) in the server, in this case memory.
It makes sense that it violates statelessness.
But how about session store in the database?
If user logins the server, server gives session cookie(ssid
) to the client, and stores the session data in the mysql database, not in the memory.
Is this also violating statelessness?
If it is true, what is the difference between "session storing in the database" and "user request that is making query to database data?"
Both of them are extracting some data from the database when the client request is made.
It is obvious that the latter does not violate statelessness otherwise REST
architecture would have never been that so popular.
my previous question, RESTfulness violation regards to the database the answerer says "it is not violating"
Vice versa, Do sessions really violate RESTfulness? the answerer says "yes it is violating". but that answer may bound to the only server-side(memory).
So confused.