On Mon, Apr 28, 2014 at 3:05 PM, Jonathan Vanasco <[email protected]>wrote:

> I don't remember what we were using, but some of the backend drivers we
> had at one point weren't using `Pickle`
>

Pyramid has an ISession interface and that is the point of pluggability of
sessions. Due to this, there really isn't an explicit need for some
multi-backend library. Beaker has one because Pylons and other frameworks
did not define what a session should be in the way that Pyramid does.
Bindings can use the SignedCookieSessionFactory, or the underlying and more
useful webob.cookies.SignedCookieProfile, to handle the actual cookie
management (tracking the id), at which point they basically just need to
implement a dict that tracks changes and persists them to their backend.
And yes, Pyramid requires they support pickleable stuff if you want it to
work with arbitrary Pyramid apps right now.


> client-side sessions don't have an id, but server-side sessions require
> it.  because pyramid doesn't have an official interface to support this,
> all server side session libraries need to implement this themselves --
> somehow -- to support it. I stress "somehow".  There's no way to ensure or
> expect consistency in this across libraries. If you look at how different
> session providers in the ecosystem have dealt with this, there is little
> uniformity in approach.  I've seen `session_id`, `_session_id`, `sessionID`
> and a few other variations -- both as attributes and internal dict values.
>  If ISession had an official `session_id` attribute, then people developing
> server side libraries would adapt to that; there would be uniformity and
> portability.   Those using client-side sessions would never use or expect a
> session_id , and not be inconvenienced.
>

Why do clients (developers using request.session) need the session id? How
is this not an implementation detail of a single session factory? Are you
dual-purposing this id for things? Do you expect other session backends to
reuse this id somehow?

-- 
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/d/optout.

Reply via email to