I don't understand what you mean by fine-grained, please elaborate. Aparts from that, I think to use a session to store authentication, login state and user association is about the best usage one can make of a session. There's little else that occurs to me requiring a session at all.
Quoting Michael Bayer <[EMAIL PROTECTED]>: > if you have a big application with multiple servers and > all, its often better to represent user-oriented concepts in a more > explicit and fine-grained way rather than a serialized (the other > kind of serialized) BLOB. > > On Mar 16, 2006, at 9:51 AM, Florian Boesch wrote: > > > I need state mainly for a bunch of authentication related > > information, if a user > > is logged in and to associated the session with a user (in case he > > *is* logged > > in). > > > > I don't lock a row on principle, only when a handler gets to do > > something that > > requires session changes. > > > > Quoting Jonathan Ellis <[EMAIL PROTECTED]>: > > > >> No, I was referring to the transaction-oriented meaning of > >> serializable: > >> that "any two successfully committed concurrent transactions will > >> appear to > >> have executed strictly serially, one after the other." In this > >> case, by the > >> brute-force method of actually taking away the ability to process > >> multiple > >> requests (from the same user) in parallel. :) > >> > >> Perhaps I'm wrong, but it sounds like your algorithm is > >> > >> 1) lock user session > >> 2) process request > >> 3) commit session changes > >> 4) unlock > >> > >> Many developers new to web development (ab)use sessions to for all > >> their > >> statefulness. I don't mean that as an insult; I did myself. But > >> there are > >> better ways. Fundamentally they involve splitting state up among > >> smaller > >> units than a monolithic "session." > >> > >> If you give an example of where you're dumping state to the > >> session, I'd be > >> happy to suggest alternatives. :) > >> > >> On 3/16/06, Florian Boesch <[EMAIL PROTECTED]> wrote: > >>> > >>> I don't understand that statement, can you rephrase? > >>> > >>> On an outline, the difficulty to deal with is: > >>> > >>> #1 statefull web applications > >>> #2 an array of servers to satisfy a high load of requests > >>> #3 a simplistic apache proxy load balancer (no dns roundrobbin) > >>> > >>> I particularly don't understand what serializable (a technical > >>> concept > >>> describing the possibility of converting a data-structure to a > >>> string), > >>> has to > >>> do directly with user expirience. > >>> > >>> Quoting Jonathan Ellis <[EMAIL PROTECTED]>: > >>> > >>>> I would say that if your application relies on session updates > >>>> being > >>>> serializable, you need to rethink how you're using sessions. It > >>>> also > >>> makes > >>>> for a lousy user experience. > >>>> > >>>> On 3/15/06, Florian Boesch <[EMAIL PROTECTED]> wrote: > >>>>> > >>>>> How do you solve the problem of sessions represented as rows in > >>> database, > >>>>> accessed by an array of web-application servers? > >>>>> > >>>>> The idea is that concurrent write access to session data will > >>>>> happen > >>>>> inevitably, > >>>>> and since throwing an error page at your user everytime it does > >>>>> is not > >>> a > >>>>> satisfactory solution you force no errors to happen by locking. > >>>>> > >>>>> It'd be grateful not to do that pattern, and if you see some > >>>>> way which > >>> has > >>>>> escaped me please tell me so. > >>>>> > >>>> > >>>> -- > >>>> Jonathan Ellis > >>>> http://spyced.blogspot.com > >>>> > >>> > >>> > >>> > >> > >> > >> -- > >> Jonathan Ellis > >> http://spyced.blogspot.com > >> > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the > > live webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Sqlalchemy-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Sqlalchemy-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

