[medusa] Medusa/Bobo nonblocking?
Fri, 09 Mar 2001 12:08:58 -0800
Eugene Leitl wrote:
> I don't need the high performance of Medusa, but I need it to be
> nonblocking, as my cgi-bin queries can take awhile. From seconds to
> minutes. I would also rather like to be able embed Python into server-side
> HTML as well as cgi-bin which doesn't invoke an external instance of
> Python. The server doesn't need to be high-performance, but I'd like it to
> be relatively small. It would be nice if the solution was also resistant
> to memory leaks, but that's a little too much to ask for, given above
> Does Medusa/Bobo fit the ticket? It's for a commercial product, btrw.
> Or should I just take a good small http server written in C, and extend
> Python with it?
Depends on the nature of you CGI scripts. If they are taking a long time
because they're doing work that would cause a non-blocking process to block
for long periods of time (say, long SQL queries), then you either won't get
any advantage, or you'll have to rewrite your cgi to be event-driven.
Another approach to this is to use an async http server like squid as a
reverse proxy. (check out http://pasadena.wr.usgs.gov/stans/slashdot.html for
an explanation of this setup)