[Stackless] Stackless WSGI http server..

Alec Flett alecf at flett.org
Fri Apr 6 16:14:19 CEST 2007

Hey folks -
I've scoured the web, the wiki, and anywhere else I can think of. I'm
wondering if anyone has written a stackless-based WSGI-compliant http

I've got a bunch of WSGI apps and middleware that I currently run under
mod_python with prefork apache. Apache is driving me nuts and I'd like to
switch to an asynchronous model. It's pretty CPU hungry stuff but I think
I've figured out a good way to break up the work. Stackless seems ideal for
this -- just dispatch each http connection to a new tasklet. Plus stackless
would allow me to easily share common work between the tasklets.

(I looked at Twisted but since WSGI is pretty callstack-oriented, WSGI &
Twisted kind of a nasty combination)

I don't need anything special from the server itself beyond the WSGI
capability because I'm using formencode, selector, and other WSGI-based
middleware that does all the work of your classic app server.

I started down the road of building on the WSGIServer/WSGIRequestHandler
stuff in wsgiref, (which is based on BaseHTTPServer) but as it started to
get complicated I thought, surely someone has dealt with this stuff before?

As an aside, this stuff will be eventually running on multi-core machines.
Two cores today, and I'm sure more tomorrow. One thought I had was to run
one long-running stackless python for each core, and let lighttpd do the
work. In that case, maybe what I really need is a fastcgi-wsgi gateway
that's stackless friendly. Has anyone explored that avenue?

But hey, if nobody else has done this stuff, I'll be happy to share my

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070406/64ebb169/attachment.htm>
-------------- next part --------------
Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list