hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Pipelining capable 4.2 HttpClient
Date Tue, 04 Dec 2012 21:13:02 GMT
On Tue, 2012-12-04 at 11:32 -0800, Jonathan Booth wrote:
> Hi all,
> I'm continuing the apparently elusive quest to get a pipelining capable client. We're
using the 4.2 HttpCore-NIO parts to build one. I'm aware of the issues with non-idempotent
POST/PUT requests, as well as expect: 100-continue forcing a pipeline flush. We still need
pipelining for our use case (high bandwidth message rate of small messages over long-latency
links with idempotent PUT transfers). I found the previous mails on this list talking about
do this in the AsyncNHttpClientHandler, which is now deprecated in 4.2.
> It looks like I just need to modify HttpAsyncRequestExecutor to have a queue of states
so it can track the messages that are in-flight but not yet replied to. It seems like it should
work, but a first pass at it doesn't actually do pipelining. I am getting a feeling I also
need to extend/replace HttpAsyncRequester and BasicAsyncRequestExecutionHandler in order to
have a version of the handler where I can close the requestProducer and responseConsumer independently
(producer once I move to MessageState.COMPLETED for that request, and consumer once we get
a reply back).
> Can anyone comment if I'm on the right track, or off in the weeds?

Hi Jonathan

I believe you are on the right track. You'll definitely need a pipeline
capable version of HttpAsyncRequestExecutor and most likely a custom
HttpAsyncRequestExecutionHandler (or similar interface optimized for
pipelining) as well.

I was planning to work on adding support for message pipelining to
HttpCore but it looks like I will not get around to until HttpClient
(blocking) 4.3 is released.



To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message