6 messages in com.googlegroups.pylons-discussSession store
FromSent OnAttachments
Robert Ian Smit22 Apr 2007 04:51 
Robert Ian Smit22 Apr 2007 06:22 
Damjan24 Apr 2007 18:31 
Shannon -jj Behrens27 Apr 2007 17:24 
Cliff Wells27 Apr 2007 22:26 
Shannon -jj Behrens01 May 2007 17:54 
Subject:Session store
From:Robert Ian Smit (bob-@public.gmane.org)
Date:04/22/2007 04:51:39 AM
List:com.googlegroups.pylons-discuss

I need to be able to store sessions in such a way that requests can be handled by multiple application servers transparently and that session data survives a restart.

The only way to do this is with the supplied features is to use a network filesystem for the session files.

I am not sure that this will work out. Will locking be a problem? Will performance suffer?

I have created SQLAlchemyNamespaceManager which derives from myghty.container.NamespaceManager.

The do_close, do_remove, do_open methods use a sqlalchemy table object to create and update the session hash.

In a dummy myghty app I am able to create a session object like this:

from sqla import SQLAlchemyNamespaceManager session = m.get_session(session_namespace_class=SQLAlchemyNamespaceManager, dburi='mysql:// dbuser:dbpass@localhost/sessions_db')

I am now looking for a way to use SQLAlchemyNamespaceManager as session store in my Pylons controllers.

I have tried to modify lib/environment.py, config/middleware.py, and lib/base.by but without any success.

How can I use a custrom NamespaceManager for a Pylons session?

Thanks.

Bob