[Web-SIG] Proposal for asynchronous WSGI variant

Christopher Stawarz cstawarz at csail.mit.edu
Wed May 7 20:00:21 CEST 2008


On May 7, 2008, at 4:20 AM, Graham Dumpleton wrote:

> 2008/5/7 Manlio Perillo <manlio_perillo at libero.it>:
>> With your solution it seems that writing middlewares will not  
>> became more
>> easy.
>
> Part of what I was trying to say was that this needn't be exposed to
> middlewares, unless it has to be. It was effectively a lower level of
> interaction which a middleware immediately on top of the WSGI adapter
> would use to hook into the async type model, but then present it to
> higher levels as more traditional WSGI interface.

That would be a really elegant solution, except, as you say:

> That layer would
> though obviously use something like greenlets to bridge the two.

The problem being that greenlets aren't part of the Python language.   
They're an extension that works by doing clever stuff with the C  
stack.  And as much as we might wish that Python supported them  
natively (which I do, since they're a really nice alternative to OS  
threads), it doesn't, so I don't think they can play any role in a  
WSGI-ASYNC spec.


Chris


More information about the Web-SIG mailing list