cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: HTTP Pipelining Contributions

From: Joe Mason <jmason_at_rim.com>
Date: Wed, 25 Jul 2012 14:40:08 +0000

> From: curl-library-bounces_at_cool.haxx.se [curl-library-bounces_at_cool.haxx.se] on
> behalf of Vladimir Grishchenko [vladgri_at_hotmail.com]
>
> Assuming this new option (CURLMOPT_MAXCONNECTS_HARD) will be supported when
> not using pipelining, will the client be able to prioritize queued requests or
> it is going to be a FIFO implementation?

FIFO to start, but we should consider expandability.

Can you suggest an interface that would let the client prioritize queued requests?

I can think of a couple off the top of my head:

1. Allow the client to provide a sort function for requests. If one is set, then requests are stored in a priority queue using that sort function. If not, use FIFO.

This has the advantage of being simple and expandable, but needs a call through a function pointer for every request.

2. Add an algorithm parameter (initially defining only FIFO), and have curl implement other algorithms internally.

This can be optimized well, but is a lot harder to extend and could cause bloat inside curl.

(In both of these cases, we can default to FIFO if the new option is not set, so the option can be added after the initial work is done.)

Joe
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-25