Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-08 Thread Jonathan Vanasco
On Feb 8, 12:33 pm, Michael Merickel wrote: > Encryption is all well and good but I'm not sure I'll trust encryption in a > library called "insecure_but_secure_enough". :-P i think its best to be upfront with the shortcomings of technology in general! if you spin up a few AWS instances, you can

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-08 Thread Michael Merickel
Encryption is all well and good but I'm not sure I'll trust encryption in a library called "insecure_but_secure_enough". :-P Signed cookies are trivial to create within pyramid using signed_serialize and signed_deserialize. http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/api/session.

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-08 Thread Jonathan Vanasco
> I never did because the data disappears if you reboot the server and users > get annoyed if their session gets dropped in the middle or they have to log > in again FWIW - to get around that , I use an autologin routine... 1. I set an autologin cookie for anywhere from 1-30 days ( 1 if I d

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Mike Orr
On Wed, Feb 6, 2013 at 1:33 PM, Wyatt Baldwin wrote: > I'm in the process of migrating a Pylons app to Pyramid. It uses a > SQLAlchemy/MySQL back end for sessions (the session DB is separate from the > main app DB). > > I swapped out Beaker's SessionMiddleware with a pyramid_beaker session > facto

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Jonathan Vanasco
hm, i'm looking at the ext source ( https://github.com/bbangert/beaker/blob/master/beaker/ext/database.py ) and the files mike noted as well. i likely missed something, but I don't see anything in the ext.backend or pyramid_beaker that handles closing connections, and it looks like very rudimenta

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Wyatt Baldwin
On Thursday, February 7, 2013 7:32:00 AM UTC-8, Jonathan Vanasco wrote: > > what are you using to manage sql connections in your app ? > Forgot to mention that I'm using a slightly modified version of Beaker's ext:database back end, but when I switch to the stock ext:database back end, the issu

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Eric Rasmussen
Most session implementations (including beaker) have a timeout setting to decide how long the session data should remain valid (server side, independent of the cookie expire settings). When you access request.session it's going to load the session from storage and update the last accessed time as a

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Wyatt Baldwin
On Thursday, February 7, 2013 7:32:00 AM UTC-8, Jonathan Vanasco wrote: > > what are you using to manage sql connections in your app ? > > i dropped pyramid's transaction management and went with my own > solution - which registers a db cleanup routine via a tween. > depending on how your conn

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Jonathan Vanasco
what are you using to manage sql connections in your app ? i dropped pyramid's transaction management and went with my own solution - which registers a db cleanup routine via a tween. depending on how your connections are managed, you might be missing a cleanup. please post the fix when you figur

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-06 Thread Michael Merickel
I'm staring at the code for both pyramid_beaker and the SessionMiddleware, and in both cases I do not see any code to close the session. The behavior looks to be consistent between the two to me. Neither library appears to do anything unless the session object was accessed, and in both cases they s

Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-06 Thread Wyatt Baldwin
I'm in the process of migrating a Pylons app to Pyramid. It uses a SQLAlchemy/MySQL back end for sessions (the session DB is separate from the main app DB). I swapped out Beaker's SessionMiddleware with a pyramid_beaker session factory. This seems like a straightforward transformation, and unde