[Web-SIG] [ANN] twsgi: asynchronous WSGI implementation for Twisted Web

Graham Dumpleton graham.dumpleton at gmail.com
Fri Apr 9 14:21:57 CEST 2010


On 9 April 2010 22:15, Manlio Perillo <manlio_perillo at libero.it> wrote:
> Graham Dumpleton ha scritto:
>> [...]
>>> But since the write callable **can** be implemented in a middleware
>>> (using greenlets) and since middlewares *can* be configured inside WSGI
>>> gateway, implementations can still claim to be WSGI 1.0 conformant.
>>
>> Then only the higher level middleware adapter can even claim to be
>> WSGI compliant and deserve to use the WSGI name.
>
> Since the middleware is executed inside WSGI gateway, and the gateway
> can be configured to always execute some middleware, the final
> application will simply have at disposal a WSGI conformant write callable.

Then it isn't really a middleware at all then, but a part of your
overall solution. So long as only the complete solution is exposed and
is WSGI compliant then fine. But if it is going to be layered in any
way such that lower level layers can be used in their own right, then
the lower level layers shouldn't really be said to be WSGI if they
don't implement full WSGI specification. As much as we all have our
complaints about WSGI specification, it is what it is and is all we
have right now.

Graham

>> Any underlying
>> abstraction you use at the web server interface isn't WSGI and by
>> rights should be called something else so there is no confusion and
>> also shouldn't use 'wsgi' keys in its environ dictionary. Have your
>> high level middleware do a completely remapping of names as
>> appropriate.
>>
>
> This will add useless overhead.
>
>>>> Why don't you given it all a completely different name else you will
>>>> just cause ongoing confusion
>>> In don't really see how this can cause confusion!
>>
>> So, when someone goes and runs a WSGI application directly against you
>> WSGIish web server interface which you still insist you can describe
>> as being WSGI and it fails because the write() method isn't
>> implemented what is your answr going to be? If something is going to
>> use WSGI name it should implement the full WSGI specification.
>>
>
> To make people happy, I can just have the default implementation include
> the required middleware by default.
>
>>>> like you did with when you felt you could
>>>> reuse the 'mod_wsgi' name for your nginx
>>> In fact the first thing I did during code refactoring was to rename it
>>> to ngx_http_wsgi_module.
>>
>> The mod_wsgi name is still used all through
>> http://wiki.nginx.org/NginxNgxWSGIModule that I can tell.
>>
>
> I still have to update it.
>
>
> Manlio
>


More information about the Web-SIG mailing list