On Mon, Feb 17, 2014 at 3:05 PM, Jonathan Vanasco <[email protected]> wrote: > Ah. I didn't interpret any of his stuff like that. > > Dogpile is just the locking / storage mechanism. It could safely be used > to manage a session backend. > > The question is, would you rather: > > a- The Session ID is the key to some abstract blob on the server ( which is > what Beaker does, what PHP and most other frameworks handle ) > b- The Session ID is an encrypted key to some datastore. > > I use A, because I'm lazy. I'd prefer B -- and have a shared session for > users across all devices -- except I often need "A" style functionality ( > ie, "flash" messages and short status )
"B" just needs some cookbook examples. And I think Pyramid's session infrastructure needs to support session IDs. Not as a requirement for all backends, but as support for the backends that want it so they don't all have to reinvent the wheel. I'd like the 'session.id' attribute to be standard, although that may be too much. (Currently, my code uses 'getattr(session, "id", None)' to determine the session ID and whether the backend supports that kind of ID. Perhaps it should be 'session["id"]'; I'm not sure, but Beaker uses 'session.id' and I think pyramid_redis_sessions does (?). The two problems I had with implementing B was, one, figuring out how Beaker manages the session ID, and two, the number of subtables I'd have to add. Session data tends to me more hierarchical than regular model data in my experience. For searches I have to store the criteria (multiple fields), the result IDs (a list), flash messages (a list or type:list queues). So my two-table application would explode to five or six tables, plus configuring all the relationship attributes. I started to do it but it got so complicated I went back to Beaker because it's working (and I'm now heading toward pyramid_redis_sessions). -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
