[mod_python] session data and shared memory

Conrad Steenberg conrad at hep.caltech.edu
Sun Jan 12 20:07:29 EST 2003


Hi Lex

You can also take a look at using Berkeley DB, which carries a lot less
overhead than traditional DBs, and stores key value pairs (it looks like
a dictionary). It is very fast, persistent, and scales to TBs in size.
Which you hopefully don't need ;-)

The Python binding is at pybsddb.sf.net. I use it for an XML-RPC app
server at clarens.sf.net.

Cheers

Conrad

On Sun, 2003-01-12 at 17:35, Lex Berezhny wrote:
> hello,
> 
> I know the issue of session management has been brought up before, but I
> have a more specific question on the topic. Is there a way to keep
> session state across threads/forked apache processes?
> 
> Storing the session state in a database carries a lot of overhead since
> every request requires at least one query.
> 
> Another solution I had in mind was to use the ZODB with ZEO, so that
> when a user logs in for example a session object will be created in the
> ZODB. But this seems like a great deal of hoops just to store a few
> attributes of session.
> 
> I have also thought about implementing a very basic LDAP like session
> registry service. Each mod_python process would open a connection to
> this registry and be able to share session data with other processes.
> 
> Has anyone else faced such a problem? Are there any other ways to
> synchronize data between mod_python instances?
> 
> thanks in advance,
> 
>  - lex
-- 
Conrad Steenberg <conrad at hep.caltech.edu>




More information about the Mod_python mailing list