quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Pearce <barry.pea...@copyrightwitness.net>
Subject Re: [mod_python] Sessions performance and some numbers
Date Sat, 09 Apr 2005 08:18:37 GMT

Sorry to jump in here...

>> Yes, there is a lock for the duration of the session. This is to make 
>> sure that no two requests for the same session are processed at the 
>> same time (this is a little documented artifact of sessions in other 
>> environments, e.g. jsp).
>> The lock 0 is there to serialize access to the DBM. So we have 
>> "session locks" and "dbm store lock" which serve different purposes.
>> Since there is a one-to-one correspondence between sessions and files 
>> in a FileSession, you're right the lock 0 use is probably not 
>> appropriate (although disk I/O is ultimately serialized by the OS).

Quite. It means the existence of a session means it is locked.

If a lock exists for the duration of a session rather than the duration 
of a request, how do you differentiate the user opening the page in 
another tab/window and then attempting to navigate/interact on both of 
them? This would therefore make the concept of the session lock 
redundant (from what I understand above). Therefore the only thing you 
can protect against is concurrent access to the storage - its one of the 
downsides of server-side sessions.

Im sure ive missed something about this...a few pointers to where my 
thinking is going wrong would be appreciated.


View raw message