Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-02-03 Thread Federico Cabiddu
Merged #480. --- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/480#event-537615394___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-02-01 Thread Daniel-Constantin Mierla
Trying to summarize the discussion from yesterday in Brussels at Fosdem between @oej, @grumvalski, @camilleoudot & all: * https://twitter.com/giavac/status/693809404177715202 The main points (if I forgot something or misunderstood, just add more): * rename the modules (something starting wi

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-28 Thread Federico Cabiddu
Some commits following received suggestions: - allow global and per query cert and key configuration - memory manager configuration - allow to send a query without suspending the transaction --- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/480#issuec

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-22 Thread Daniel-Constantin Mierla
OK, maybe would be good to have a mod param option to control what mem pool (system or kamailio) is going to be use. I think the module should be merged, then renamed to http_client or httpc. If combining with curl module proves necessary over the time, then the curl module can end up being jus

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-22 Thread Camille Oudot
It is using system memory by default indeed, but we preferred kamailio's pools, to have a better view/control on what is going on. --- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/480#issuecomment-174001794___

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-22 Thread Daniel-Constantin Mierla
Isn't curl using the system memory by default? It should not affect the pkg usage. On the other hand, I don't think people will use the two modules discussed here at the same time. if there is a conflict in initializing the curl library, then utils and xcap_client are also using it. --- Reply

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-22 Thread Camille Oudot
If both modules should be used at the same time, the most problematic point would be calling `curl_global_init()` several times IMO (although the libcurl documentation states that it must be called "at least" once). However, **async_http** uses the `curl_global_init_mem()` version (it allows cur

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-20 Thread Olle E. Johansson
Since both modules are using CURL they need similar names. Since they should not be used at the same time, this should be documented. We can still rename the CURL module before release. A big difference is that the curl module use a connection configuration, much like SQLops. Stubbornly I sti

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-20 Thread Federico Cabiddu
Thanks Hugh for the feedback! On Wed, Jan 20, 2016 at 5:34 PM, Hugh Waite wrote: > Thanks for this module - a very useful feature! > I have a couple of use cases for curl/async_http which are possibly off > topic (major enhancements), I mention them here so that if any > redesign/code sharing h

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-20 Thread Federico Cabiddu
Thanks for the feedback Daniel. I just pushed 2 commits from Camille to implement pv module api and use it in the new module. I'll also add a note on the documentation about the conflict with the curl module. About the name, http_client could be a good one, the current one having been chosen mainly

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-20 Thread Hugh Waite
Thanks for this module - a very useful feature! I have a couple of use cases for curl/async_http which are possibly off topic (major enhancements), I mention them here so that if any redesign/code sharing happens they are taken into account. * Sending asynchronous queries without suspending main

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-20 Thread Daniel-Constantin Mierla
I am ok with many modules targeting to offer similar functionality, if they have different approach -- like lcr can be achieved with couple of modules. If there is a conflict with another module, that needs to be documented. Some remarks: * using functions from pv module must be done via inte

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-18 Thread Federico Cabiddu
I agree on having a single curl based module. I started looking at curl module when this module was almost finished, in its core part, with this purpose but, due to the chronic lack of time, the result was that the job on the async module was stagnating beacuse an integration would have meant a dee

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-18 Thread Olle E. Johansson
Having said that I agree that we need async HTTP :-) --- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/480#issuecomment-172550176___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.or

Re: [sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-18 Thread Olle E. Johansson
I would like this to be merged into the CURL module (it's mentioned in the todo). Having multiple modules calling CURL is not a good thing, especially if they use HTTPS (multiple initialisations of OpenSSL is not a good thing). That's also why Hugh added an API to the curl module, so we can build

[sr-dev] [kamailio] async_http: non-blocking HTTP client module (#480)

2016-01-18 Thread Federico Cabiddu
This new module, based on libevent and cURL multi interface, implements non blocking HTTP queries. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/480 -- Commit Summary -- * pv: expose some PV API function * async_http: non-blockin