[Web-SIG] ngx.poll extension (was Re: Are you going to convert Pylons code into Python 3000?)
Phillip J. Eby
pje at telecommunity.com
Thu Mar 6 17:59:57 CET 2008
At 01:11 PM 3/6/2008 +0100, Manlio Perillo wrote:
>Manlio Perillo ha scritto:
> > [...]
> > I'm not sure that having two standards is the best solution, since it
> > will complicate the implementation of a WSGI middleware.
>A correction: it should be WSGI gateway and not WSGI middleware.
On the contrary, it will simplify gateway implementation, if bridges
are available. Async gateways would implement WSAI, synchronous
gateways would implement WSGI.
The wsgiref library could include a standard bridge or two to go in
each direction (WSGI->WSAI and WSAI->WSGI), and the gateway would
provide some support for spawning, pooling, or queueing of threads,
where threads are needed to make the conversion from WSAI to WSGI
(since in the other direction, you can simply block waiting for a
callback). The APIs could be provided through some standardized
environ keys defined in the WSAI spec.
More information about the Web-SIG