Simple threaded web-server based on BaseHTTPServer?

Michael Ströder michael at
Thu Jan 31 17:54:40 CET 2002

Thomas Weholt wrote:
> PS! I *do* think Medusa is great. I just want a lightweight, easy to use and
> stable framework to base my application-server on. The keyword here is
> application-server; many of the pages will server content taking up to 10
> seconds or more to produce from the subsystems -> threads required ??

Well, 10 seconds is quite a long time. But that doesn't mean that
the asyncore model does not fit your needs. If you can start the
request to the backend system (1. state) and get the results in a
async manner afterwards (2. or later state) you can go with asyncore
model even if processing the request at whole takes 10 seconds.

In my case ( I'm using threaded BaseHTTPServer
but I'm not really happy with it. Especially since I have to use a
module-wide lock to serialize calls into python-ldap module because
the underlying OpenLDAP libs are not thread-safe. This can block the
whole thing and killing threads on e.g. Linux is not possible.
Having a single-process asyncore design would probably make things

Ciao, Michael.

More information about the Python-list mailing list