mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Genender <jgenen...@apache.org>
Subject Re: [AsyncHttpClient] On bringing the code bases and communities together
Date Tue, 05 Feb 2008 05:02:19 GMT


Mike Heath wrote:
> To clarify, my understanding of pipelining is that it is sending
> multiple requests and then waiting for the corresponding responses.
> This is more than HTTP keep alive which would also allow using a single
> connection for multiple requests but doesn't necessarily involve the
> batching of pipelining.

I understand it slightly different..that you can send multiple requests
through the same socket.  The difference between what you said and what
I said is I think pipelining does not have stacked waiting.

> 
>> But if you are saying its possible, then great!
> 
> What I'm saying is that in the AHC code at
> http://svn.apache.org/repos/asf/geronimo/sandbox/async-http-client-mina2,
> the HttpIoHandler.TimeoutTask is unaware of which request has been sent.
>  It only knows which IoSession is being used (that's the only field in
> the TimeoutTask).  So essentially the timeout logic as it is implemented
> in AHC is no different than using the MINA idle logic.
> 
> Does the AHC client currently support pipelining?  If I issue two
> pipelined requests, and the first one times out causing the session to
> close.  How does the future of the second request get notified of the
> timeout?  I only see code for working with CURRENT_REQUEST (from the
> IoSession attributes).  I don't see any code for dealing with pending
> requests.
> 

You are right....no AHC does not support pipelining but we were coding
it to go in that direction so we could.  We knew that it would be a lot
more complex to implement, but wanted to sow the seeds of the code to
handle it when we did.

OTOH, I must admit I implemented the ScheduledExecutor based on the FAQ
and a few IRC discussions ;-)  but if sessionIdle will work, then that
would be the way to go.

> -Mike
> 
> BTW - Thanks for the discussion, Jeff.  It's really helped me to go back
> and look deeper in the AHC code.

Thank you...and thanks for taking an interest...this is great ;-)

> 
> -Mike

Mime
View raw message