[mod_python] Session managment for mod_python

MichaelStröder michael at stroeder.com
Mon Oct 16 08:41:48 EST 2000

Gregory Trubetskoy wrote:
> On Sun, 15 Oct 2000, Damjan wrote:
> > > what do you mean by session management?
> > >
> > The best session managment would be a Python dictionary, that is global
> > to all subinterpreters, and all Apache processes, and that retains its
> > state across handlers and requests.
> Let me guess - if Apache process is restarted, you would like the state to
> be retained througout the restart?

If Apache starts session data can be lost.

> > Of course you could do this with a database and pickle-ing the user
> > object. Or you could do this with a shared memory.
> I think you answered your own question - this sort of thing is best done
> with a database.

Some objects are not pickeable but worth to be kept in a session
cache. E.g. connection objects of a database access.

Nevertheless most web applications could provide a session managment
themselves. There are some projects which implement this for Python
(e.g. webware etc.)

Ciao, Michael.

More information about the Mod_python mailing list