Re: Locking problem with mod_python

2006-08-17 Thread Ivan Sagalaev
Daniel Poelzleithner wrote: > Yes i know. There would be other solutions like shm, or global mutexes, In fact those two don't seem to work for this situation anyway. I was digging this whole field over a month ago and remember that the main problem is that to use anything shared in memory you

Re: Locking problem with mod_python

2006-08-16 Thread Malcolm Tredinnick
On Thu, 2006-08-17 at 04:15 +0200, Daniel Poelzleithner wrote: [...] > I think django should have a Lock class and maybe Semaphores, too, which > check which type of server the app is running and choose the best > locking method. I think this is really beyond the scope of Django. If you need

Re: Locking problem with mod_python

2006-08-16 Thread Daniel Poelzleithner
Ivan Sagalaev wrote: > As Ian has pointed you can use file system as a device for locking > between separate processes. This is not really something specific to Django. Yes i know. There would be other solutions like shm, or global mutexes, but filelocks seem to be the best of the worst.

Re: Locking problem with mod_python

2006-08-16 Thread Ivan Sagalaev
Daniel Poelzleithner wrote: > After further investigation, i found out that locking of any kind > doesn't work with apache in prefolk mode, and more or less in the > threaded mode. I haven't found a nice and clean solution yet to do > locking on requests, which worries me a little bit. Locking

Re: Locking problem with mod_python

2006-08-16 Thread Daniel Poelzleithner
Ian Holsman wrote: > aren't semaphores inter-process (not cross process)? > > try using a file handle instead.. After further investigation, i found out that locking of any kind doesn't work with apache in prefolk mode, and more or less in the threaded mode. I haven't found a nice and clean

Re: Locking problem with mod_python

2006-08-15 Thread Ian Holsman
aren't semaphores inter-process (not cross process)?try using a file handle instead..regardsIan.On 16/08/2006, at 11:49 AM, Daniel Poelzleithner wrote:Hi,I have a function that generates a tile for a google map overlay andwrites it to disc so later requests can simply use the file. Due thenature

Locking problem with mod_python

2006-08-15 Thread Daniel Poelzleithner
Hi, I have a function that generates a tile for a google map overlay and writes it to disc so later requests can simply use the file. Due the nature of the map, generating the tiles previous is not a option so it has to be done on demand, which works nice on the developer server but not on