← Back to team overview

nova team mailing list archive

Re: WSGI Architecture

 

Will do! In fact, here is a branch with what I'm proposing:

https://code.launchpad.net/~eday/nova/wsgi-rsapi/+merge/32037

-Eric

On Sat, Aug 07, 2010 at 01:29:23PM -0400, Todd Willey wrote:
>    Agreed.  Hack away at wsgi!
> 
>      On Aug 4, 2010 9:50 PM, "Eric Day" <eday@xxxxxxxxxxxx> wrote:
> 
>      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:
> 
>      http://pastebin.org/448203
> 
>      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.
> 
>      Thanks!
>      -Eric



References