IPC
Gerhard Häring
gh at ghaering.de
Mon May 19 11:55:28 EDT 2003
Max Khesin wrote:
> I am looking to implement a fast IPC mechanism w/python. mmap module looks
> ripe for the strorage part of it - can't get faster than shared memory! The
> missing link I am looking for here is the signaling part. Basically one of
> my processes works as a server and maintains a large data structure in
> memory. The client (a CGI script in my case) requests some info about the
> data structure (request being stored in shared mem) and waits for the reply.
> On windoze I would probably build a queue for the requests and use something
> like SetEvent to tell the server that the queue was updated. Then I would
> put the client in a waiting state via one of the WaitFor* funcs and have the
> server activate it via a windows event or a mutex when the result is ready.
> So I am looking for an equivalent (or better) way to do this in python.
One of these might help:
http://libshbuf.sourceforge.net/
http://poshmodule.sourceforge.net/
> Also
> I had the impression that there is some more direct support in python for
> presistent-CGI-in-memory kind of stuff, maybe someone can give me a pointer?
Everything but CGI will have long-running processes :-)
I like Quixote nowadays, especially the combination with mod_scgi looks
neat. I haven't much experience with it, though, I'm just half-way
through implementing a webapp for configuring a hosting environment
using Quixote/mod_scgi and a PostgreSQL database as backend.
There are tons of other alternatives that you can find best starting
from http://www.python.org/cgi-bin/moinmoin/WebProgramming
None of them have the process startup/module load time/db connection
issues CGI has.
-- Gerhard
More information about the Python-list
mailing list