← Back to team overview

nova team mailing list archive

WSGI Architecture


Hi Todd,

Michael and I have been looking at different ways to structure WSGI
apps lately, and one of the things we were discussing in another
thread is to keep all the layers as WSGI interfaces. After reading
through how you are handling requests in the Rackspace API endpoint,
I started playing around with how this would look using all WSGI. I am
also using the Routes package (http://routes.groovie.org/) to manage
URL parsing and routing. Here is an example:


This ties together Eventlet and carrot with async requests. If you
start this up (with rabbit running too), you can POST and GET to
/message, the GETs will hang until a message is POSTed. The /file
requests show how the parsed URL components can be used.

What do you think about using this model instead of the one you
have started int the rackspace endpoint? I think the more layers
that are WSGI, the easier it will be to move things around and reuse
components. We can also insert WSGI proxies as needed at different
layers if we ever find the need (for example, do all auth on another
machine than the request handling).

Also, are you actively working on the Rackspace API endpoint? If not,
and if you like the WSGI stacking approach, I was thinking I would
go in and convert it.