Mongrel2 WSGI adapter based on CherryPy WSGI server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mongrel2 WSGI adapter based on CherryPy WSGI server

Daniel Holth-3
For some reason I decided to base a Mongrel2 handler to WSGI adapter
on the CherryPy WSGI server. The result is at http://pypi.python.org/pypi/mongrel2_wsgi

Mongrel2 is basically a reverse proxy that sends parsed HTTP requests
over ZeroMQ to workers. This allows you to do cool things like
starting up multiple workers on multiple machines without having to
tell Mongrel2 about each one in advance; requests will be
automatically sent round-robin to all available workers. It is also
quite fast.

The original server is not quite extensible enough to allow this
without more copy and paste than I would have liked, but it seems to
work properly and does not have the annoying 'batch all content before
sending any response' feature found in some WSGI servers.

Daniel Holth

--
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: Mongrel2 WSGI adapter based on CherryPy WSGI server

Sylvain Hellegouarch


On Wed, Dec 1, 2010 at 5:50 AM, Daniel Holth <[hidden email]> wrote:
For some reason I decided to base a Mongrel2 handler to WSGI adapter
on the CherryPy WSGI server. The result is at http://pypi.python.org/pypi/mongrel2_wsgi

Mongrel2 is basically a reverse proxy that sends parsed HTTP requests
over ZeroMQ to workers. This allows you to do cool things like
starting up multiple workers on multiple machines without having to
tell Mongrel2 about each one in advance; requests will be
automatically sent round-robin to all available workers. It is also
quite fast.

The original server is not quite extensible enough to allow this
without more copy and paste than I would have liked, but it seems to
work properly and does not have the annoying 'batch all content before
sending any response' feature found in some WSGI servers.

Daniel Holth



Interesting piece you've written there. Recently I've had the need for diving into the internals of the wsgiserver module and indeed the code isn't as flexible as it might be. Mind you, it was not really intended for being massively modular either. It might be worth making it so at some point. 

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach

--
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.