[dev] ngx.poll extension for mod_wsgi
manlio_perillo at libero.it
Wed Mar 26 22:37:41 MSK 2008
For people interested I have designed and implemented an extension for
my WSGI module for Nginx for better support of asynchronous applications.
Here are some examples:
1) An example of asynchronous query to a PostgreSQL database:
The example make use of a connection pool that can grow indefinitely.
2) An example of HTTP proxy using pycurl:
3) A very simple example on how to split a long calculation:
4) A very simple example of asynchronous HTTP request
The application just "sleeps" for fixed amount of times until the
request is done.
There are still problems and possible bugs.
I would really appreciate any suggestions about the API design;
unfortunately people on the Python web-sig mailing list are not very
interested in supporting asynchronous applications...
NOTE: the extension does not works with the rtsig event module, a
segmentation fault occur.
The problem is that I simply make use of add_event and del_event, and
the rtisig module does not defines these two operations (the add_event
function pointer is NULL).
Thanks Manlio Perillo
More information about the nginx