Session ID & Security
- c o v e n t r y -
coventry at removethisandallhyphens-o-n-e.net
Fri Jul 19 23:12:25 EDT 2002
http://web.systhug.com/kernel-lock/ - for linux atomic file locking.
of course, wether your system is mulitprocess or multithreaded will vary
the lock - a python multithreaded application can perform all locking
internally. multiprocess requires external locking, such as the file
locking provided above in linux kernels and filesystems. Note that
_how_ you store and lcok your data can play a big part in how the lock
affects performance. a single, big lock on a single file containing all
session data will not scale. I use individual files per session in my
projects, and lock individually - thus only simultaneous requests from
the same session can block each other - which is normally acceptable.
-c
Paul Rubin wrote:
> - c o v e n t r y - <coventry at removethisandallhyphens-o-n-e.net> writes:
>
>>Why bother reinventing the wheel for a shared memory implementation
>>when you could just use the filesystem like everyone is used to, just
>>on a ram disk?
>>
>>Linux and the BSDs have the capability to do this...
>>
>
> I'm not aware that Linux and BSD can do synchronous, atomic file
> operations. I'm not terribly up on this stuff though. What semaphore
> mechanism would you use?
>
>
More information about the Python-list
mailing list