Hey folks -<br>I&#39;ve scoured the web, the wiki, and anywhere else I can think of. I&#39;m wondering if anyone has written a stackless-based WSGI-compliant http server.. <br><br>I&#39;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&#39;d like to switch to an asynchronous model. It&#39;s pretty CPU hungry stuff but I think I&#39;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.
<br><br>(I looked at Twisted but since WSGI is pretty callstack-oriented, WSGI &amp; Twisted kind of a nasty combination)<br><br>I don&#39;t need anything special from the server itself beyond the WSGI capability because I&#39;m using formencode, selector, and other WSGI-based middleware that does all the work of your classic app server.
<br><br>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?
<br><br>As an aside, this stuff will be eventually running on multi-core machines. Two cores today, and I&#39;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&#39;s stackless friendly. Has anyone explored that avenue?
<br><br>But hey, if nobody else has done this stuff, I&#39;ll be happy to share my work....<br><br>Alec