durusmail: quixote-users: sharing state in an scgi-driven app
sharing state in an scgi-driven app
2002-06-17
2002-06-17
2002-06-17
2002-06-17
2002-06-17
2002-06-17
2002-06-17
sharing state in an scgi-driven app
holger krekel
2002-06-17
[disclaimer i am new to this list and to quixote. I like it a lot.]

Hello,

i am currently writing a quixote application driven by scgi-0.3. I started
from the 'demo package'. All works fine!

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).

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?)

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.

thanks for any suggestions or answers,

    holger



reply