Mark-

Have you looked at SPDY? It handles the "multiplexing" that you're looking
for with respect to out-of-order requests.

I started to try and implement SPDY inside of HttpComponents, but didn't
get super far (that probably lacks my latest changes):
https://github.com/wspeirs/SPDYComponents

If you'd be interested in working on such a thing, let me know.

Bill-

On Tue, Feb 28, 2012 at 9:47 AM, Oleg Kalnichevski <[email protected]> wrote:

> On Tue, 2012-02-28 at 13:45 +0000, Mark Thornton wrote:
> > On 28/02/12 12:31, Oleg Kalnichevski wrote:
> > > On Tue, 2012-02-28 at 10:50 +0000, Mark Thornton wrote:
> > >> I am trying to implement a pipelined client using 4.1.4 (Async client
> > >> and core 4.2 aren't yet GA). It would appear that
> > >> AsyncNHttpClientHandler does not permit pipelining.
> > > No, it does not. The expect-continue handshake support and request
> > > pipelining are pretty much mutually exclusive. Default protocol
> handlers
> > > shipped with HttpCore implement expect-continue handshaking as it is
> > > required by the HTTP/1.1 specification, while request pipelining is
> > > optional.
> >
> > Not quite exclusive --- the expect handshake will force a pipeline flush
> > but pipelining can be used when there is no expect-continue outstanding.
> > Obviously it requires more work and additional synchronization between
> > send and receive parts. Will this change in 4.2?
> >
>
> I am not sure it is that simple. Sending a response to a pipelined
> request while the client is expecting a 100-continue _or_ a 4xx status
> code in case of a failed expectation would directly violate the
> specification in my opinion. Personally I do not see a non-ambiguous way
> of supporting both the expect-continue and request pipelining at the
> same time, but I'd be enormously happy to see someone prove me wrong by
> submitting such a protocol handler ;-)
>
> > > Hope this helps Oleg
> >
> > Thanks very much, it does give me confidence to proceed. I am slightly
> > tempted to extend the protocol to permit out of order responses.
> >
>
> I would advise against bastardizing the HTTP protocol. You probably
> should consider using WebSockets or Google SPDY if you want to support
> fully asynchronous message exchanges.
>
> Hope this helps
>
> Oleg
>
> > regards,
> > Mark Thornton
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to