Re:Things I Hate About PostgreSQL (2013)
by Drdrdrq on Sunday September 11, 2016 @03:15AM
(#12472352)
>... or even in a cookie (encrypted, naturally).
I won't comment on anything else because I don't know the case, but you should never put user data in cookies. Even with encryption you are exposing it unnecessarily, not to mention you have to double check data integrity... Why? Cookies are not meant for this.
Thereafter, the application didn't communicate with the database until it was time to save the record. The disconnected data set was small enough to store in shared session store, or even in a cookie (encrypted, naturally).
This architecture had a number of interesting knock-on effects. The entire state of a client's conversation with the server was tiny and entirely encapsulated by this disconnected data set, so you could record and play back each request to recreate a bug.
It didn't have to use multiple result sets from the stored procedure, but it did save a bunch of round trips.