Greg Ward wrote: > On 17 June 2002, holger krekel said: > > But i wonder how i could share state between different requests. As i > > understand it, the scgi-handler spawns new processes if the current > > processes are busy handling previous requests. But two processes can't > > easily share state anymore (Threads could). > > See doc/session-mgmt.txt . i had. My understanding is that session managment does not allow in any way to share state within the whole application. Just in a user session. If the application performs expensive computations and wants to cache results so that other users don't need to wait, sessions don't help. > > So how am I to share state within the application no matter how many > > requests arrive? Modify the scgi-handler to use threads? Would that > > be possible (any thread safety-issues involved?) > > Quixote is not currently thread-safe. Could you elaborate just a bit which parts you deem to be unsafe? > > And no, i don't like to save my state to disk so that other processes > > (serving different requests) could load it. It's mainly about caching > > computations or complex (nonsql-) queries. > > Oh. Well, you'll have to roll your own then. Doing this without > writing anything to disk sounds hellish -- I wish you good luck. i guess we have a misunderstanding here. Why would one want to persist *cached* data? In fact for my case every bit of cached data is extracted/computed from a 200 GB readonly reiserfs filesystem. I don't see the point to persist these computations and go through the hell of file-locking and/or using a persistence layer. holger