James Leigh wrote:
On Fri, 2010-03-19 at 00:23 +0100, Oleg Kalnichevski wrote:
On Thu, 2010-03-18 at 18:46 -0400, James Leigh wrote:
On Thu, 2010-03-18 at 23:27 +0100, Oleg Kalnichevski wrote:
James

Presently AsyncNHttpClientHandler does not support request pipelining, as it pretty much mutually exclusive with 'expect: continue' handshaking. You will have to develop a custom NHttpClientHandler implementation if you need support for request pipelining.

Oleg

Okay understood, but I could imagine a client handler that would support
both.
There is a very early prototype of an asynchronous HTTP client based on
HttpCore NIO and HttpClient in SVN:

http://svn.apache.org/repos/asf/httpcomponents/asynchttpclient/trunk/
I was thinking about adding support for request pipelining to it, if I
ever get around to hacking on it again.



I am going to stick with AsyncNHttpClientHandler for this project. How
does expect-continue work in AsyncNHttpClientHandler? Does it also use a
blocking interface?



Client-side 'expect-continue' code is fully asynchronous, as it does not require a callback of any kind.


 If I create a patch for AsyncNHttpClientHandler to switch between
HTTP pipelining and 'expect: continue' modes based on the presence or
absents of the expect header in the most recent request, would HttpCore
team consider it?

Absolutely.

Also what about server side pipelining? Is there any way for
AsyncNHttpServiceHandler to support pipelining? Any hints on what would
need to change to support it?

It should not be that difficult, I believe. Essentially all it takes is
an additional queue for pipelined requests and a piece of control logic
that ensures the queue gets drained before a non-pipelineable request
such as POST is processed.

I just never felt pipelining was that important to justify spending time
and efforts on it and risk getting beaten by my wife.

Having said all that, I will happily review and apply a patch that adds
pipelining capabilities.


I'll see about sending you a patch this summer.


I am looking forward to that.

Cheers

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to