Graham Dumpleton
grahamd at dscpl.com.au
Thu Aug 10 06:07:06 EDT 2006
There has been discussion on MySQL implementation of Session functionality on developers list recently. Go to: http://mail-archives.apache.org/mod_mbox/httpd-python-dev/ 200608.mbox/thread and read the posts about MySQLSession. This probably will not answer all your questions, but then what you are actually wanting to know isn't particularly clear. Graham On 10/08/2006, at 8:23 PM, Norman Tindall wrote: > Hello, > Hmm. i can`t get session model in mod_python > Is it something like a pool of session or a shared object? Is > potentialy any thread can > access any session and they locked in a time while thread handles > request? > > I am writing a simple MySQL session module, > in MySQL i can set SESS_ID solumn as UNIQUE and do something like this > > try: > c.execute("insert into sessions ...") > except MySQLdb.IntegrityError: > # here i catch duplicate entries > > Speed is a factor so.. what would be faster.. locking > with _apache._global_lock(self._req.server, self._sid) OR > MySQLdb.IntegrityError ?? > > documentation has only one row about locking > "When locking is on, only one session object with a particular > session id can be instantiated at a time." > > Could anyone give me a simple Entity Diagramm showing relations > between Session - Apache threads - Random generators used in > Sessions.py (they are also pooled for the numbers of MPM?) > and also more detailed info of what happens when session lock aquired > > Sorry i am a newbie in multi-thread and this mutex crap :) > Would be nice if anyone give me a link or a name of a good books in > this theme. > > -- > Best regards, > Norman mailto:NormanTindall at zdisk.net > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|