> It's not asynchronous. WSGI cannot properly do asynchronous anything. It
> is
> a straight-line of requests that must be handled in the same order they're
> submitted. Thus, people have to write special code for long-polling or
> websockets rather than work through existing systems.


uWSGI can be started in various asynchronous/nonblocking modes, WSGI is
only one of its plugins, you can use Web3, WSGI_lite, Pump or whatever you
want. You will find funny things like:

def application(environ):
    uwsgi.send("HTTP/1.1 200 OK\r\n")
    uwsgi.send("Content-Type: text/html\r\n\r\n")
    uwsgi.send("Hello World")

that is the rawest thing you can do.

Making plain WSGI asynchronous is practically impossibile, but uWSGI (as
well as other WSGI servers out there) have already found other solutions
(hack...).

WSGI for such servers became only a way to define an entry point for your
app.

In addition to this, do not forget not all of the users can (o want) to
move to async/non-blocking paradigm. Having a preforking (or
multithreaded) application server (like the wsgid project too) is a good
thing.



-- 
Roberto De Ioris
http://unbit.it

Reply via email to