Spawning 0.1 Released

Spawning is an experimental mashup between Paste and eventlet. It provides a server_factory for Paste Deploy that uses eventlet.wsgi. It also has some other nice features, such as the ability to run multiple processes to take advantage of multicore processors and multiprocessor machines, and graceful code reloading when modules change or the svn revision of a directory changes. Graceful reloading means new processes are immediately started which start serving new incoming requests, but old processes hang around processing the old requests until those requests are complete.

This is very early still. The code is currently hard-coded to run one process, but once I figure out how to use Paste Deploy's configuration files a bit better I will make it configurable. I mostly wanted to get it out quickly because Ian Bicking asked for it in the comments of my last blog post, and to get feedback. I'd like more of this code to be shared between Spawning and mulib's 'mud' server. I also need a better name than Spawning.

You can download a tarball here or you can clone the Mercurial repository here.

1 comment:

Ben Bangert said...

Very awesome. Works like a charm. How about having it able to detect when a WSGI app is taking a long time and spawning more to handle additional requests? Paste's WSGI server does this to avoid having multiple long requests block all new requests that are coming in.
Ian has a sample of this 'slow' WSGI app here:
Overall, very slick! If it could get some of the reliability features of the Paste#http server in it, I'd be rather tempted to use it in deployment to get the most of those multi-core servers.