[sr-dev] New async HTTP module
Federico Cabiddu
federico.cabiddu at gmail.com
Mon Jan 18 15:46:57 CET 2016
Hi all,
with two colleagues (Camille Oudot and Giacomo Vacca) we have been working
to an asynchronous HTTP module.
The module uses libevent (http://libevent.org/) and cURL's multi inteface (
http://curl.haxx.se/libcurl/c/libcurl-multi.html). It instantiates N
workers at startup, each able to generate multiple requests in parallel and
to resume the execution of the routing script upon reception of the HTTP
reply (or on error); if the query is executed in a transaction context, the
transaction itself will be suspended and resumed before continuing the
routing logic execution.
The module, apart from implementing non blocking HTTP queries, also
provides the ability to specify some HTTPS options per request, to
customize HTTP headers and to use several HTTP methods
(GET,POST,PUT,DELETE) making it very suitable for interacting with RESTful
APIs.
We hope that this module can be useful to many.
As usual any feedback and improvement proposals are more than welcome!
Regards,
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160118/3d4053f7/attachment-0001.html>
More information about the sr-dev
mailing list