You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera" <as...@apache.org> on 2011/06/26 09:52:32 UTC

Keeping track of Socket Timeout set time

Hi All

I've come across this following case:
1. We establish an outgoing connection and set the socket timeout to 5 
seconds (Time = t0 )
2. After receiving the response, we want to keep the socket open for 
reuse for 30 seconds, and we update the timeout (Time = t1)
3. After 6 seconds since #2 above, we get an opportunity to reuse this 
connection, and again we set the socket timeout to 5 seconds
4. Almost immediately, the BaseIOReactor timeout check most definitely 
notices that the time the socket was last used (t1) is over 5 seconds 
from the current time, and times out the socket

I've made a patch to overcome this, but would like to hear if there are 
any comments on it before applying..

thanks
asankha

PS: I've also been writing a ChunkDecoder capable of being a 
FileContentDecoder.. and want to submit it for review. Oleg, do you have 
any plans of making the 4.1.2 release soon?

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





Re: HttpCore 4.2 planning

Posted by "Asankha C. Perera" <as...@apache.org>.
On 06/28/2011 01:33 AM, Oleg Kalnichevski wrote:
> On Mon, 2011-06-27 at 23:12 +0530, Asankha C. Perera wrote:
>> Hi Oleg
>>> I do not have any particular time frame in mind for 4.2a1 at the moment.
>>> The biggest work item on my list for the release is port of low level
>>> connection pooling code from HttpClient and HttpAsyncClient to HttpCore.
>>> This might take a while. Feel free to release 4.2a1 sooner if you are
>>> willing to take on the job of the release manager. And by all means feel
>>> free to merge connection debugging enhancements to the 4.1.x branch.
>> I'd like to do a 4.2-alpha1 of the codebase as it is by around next
>> week.. I do not see any important issues targeting 4.2-alpha1 on the
>> JIRA. This will also allow us to skip merging the connection debug code
>> and the #261 code to the 4.1.x branch unless they are really needed there
>>
>> thanks
>> asankha
>>
> Asankha
>
> I am not trying to dissuade you but I can't help feeling there would be
> too little substance to the 4.2 alpha release at this point. There are
> virtually no difference between the trunk and the 4.1.x branch besides
> removed deprecated stuff and generified blocking components. If you
> merge the connection debugging enhancements I could cut the 4.1.2 off
> the 4.1.x branch mid next week.
>
> Cheers
>
> Oleg
Hi Oleg

I guess I was falsely assuming there were other improvements as well on 
the trunk without going through the details..

I'll merge the connection debug changes to 4.1.x branch soon, and a 
4.1.2 release sounds just fine

thanks!
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





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


Re: HttpCore 4.2 planning

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Oleg
> ...If you merge the connection debugging enhancements I could cut the 4.1.2 off the 4.1.x branch mid next week.
I had some difficulty cleanly merging the connection debugging code from 
the trunk - I guess my SVN skills have weakened after using Mercurial 
for sometime :).. But I've manually included the enhancements I wanted 
for the NIO module now. So you are all set to cut the 4.1.2 branch

thanks
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





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


Re: HttpCore 4.2 planning

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2011-06-27 at 23:12 +0530, Asankha C. Perera wrote:
> Hi Oleg
> > I do not have any particular time frame in mind for 4.2a1 at the moment.
> > The biggest work item on my list for the release is port of low level
> > connection pooling code from HttpClient and HttpAsyncClient to HttpCore.
> > This might take a while. Feel free to release 4.2a1 sooner if you are
> > willing to take on the job of the release manager. And by all means feel
> > free to merge connection debugging enhancements to the 4.1.x branch.
> I'd like to do a 4.2-alpha1 of the codebase as it is by around next 
> week.. I do not see any important issues targeting 4.2-alpha1 on the 
> JIRA. This will also allow us to skip merging the connection debug code 
> and the #261 code to the 4.1.x branch unless they are really needed there
> 
> thanks
> asankha
> 

Asankha

I am not trying to dissuade you but I can't help feeling there would be
too little substance to the 4.2 alpha release at this point. There are
virtually no difference between the trunk and the 4.1.x branch besides
removed deprecated stuff and generified blocking components. If you
merge the connection debugging enhancements I could cut the 4.1.2 off
the 4.1.x branch mid next week.

Cheers

Oleg


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


Re: HttpCore 4.2 planning

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Oleg
> I do not have any particular time frame in mind for 4.2a1 at the moment.
> The biggest work item on my list for the release is port of low level
> connection pooling code from HttpClient and HttpAsyncClient to HttpCore.
> This might take a while. Feel free to release 4.2a1 sooner if you are
> willing to take on the job of the release manager. And by all means feel
> free to merge connection debugging enhancements to the 4.1.x branch.
I'd like to do a 4.2-alpha1 of the codebase as it is by around next 
week.. I do not see any important issues targeting 4.2-alpha1 on the 
JIRA. This will also allow us to skip merging the connection debug code 
and the #261 code to the 4.1.x branch unless they are really needed there

thanks
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





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


HttpCore 4.2 planning; was Re: Keeping track of Socket Timeout set time

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2011-06-27 at 11:15 +0530, Asankha C. Perera wrote:

...

> >>   Oleg, do you have any plans of making the 4.1.2 release soon
> > Yes, within a week or two
> Do you have a time frame for 4.2-alpha1 in the near future too? I'm 
> interested in some of the connection debugging enhancements we did to 
> dump the local->remote sockets. If the 4.2-alpha1 will be delayed, I'm 
> interested to merge those into 4.1.2 if possible
> 

I do not have any particular time frame in mind for 4.2a1 at the moment.
The biggest work item on my list for the release is port of low level
connection pooling code from HttpClient and HttpAsyncClient to HttpCore.
This might take a while. Feel free to release 4.2a1 sooner if you are
willing to take on the job of the release manager. And by all means feel
free to merge connection debugging enhancements to the 4.1.x branch.

Cheers

Oleg



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


Re: Keeping track of Socket Timeout set time

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Oleg
> ...I am afraid we will have to resort to using an optional
> interface in order to get additional details which are not exposed
> through the IOSession interface.
>
> Please also raise a JIRA for this issue.
https://issues.apache.org/jira/browse/HTTPCORE-261

I've updated the IOSession interface on the trunk, and used an 
IOSessionExt for the branch, let me know if this looks ok
>> PS: I've also been writing a ChunkDecoder capable of being a
>> FileContentDecoder.. and want to submit it for review.
> Oh! That is a tough task last time I looked. Looking forward to the
> patch. Do you also plan to enhance ChunkEncoder?
Let me bring this up on another thread and JIRA

>>   Oleg, do you have any plans of making the 4.1.2 release soon
> Yes, within a week or two
Do you have a time frame for 4.2-alpha1 in the near future too? I'm 
interested in some of the connection debugging enhancements we did to 
dump the local->remote sockets. If the 4.2-alpha1 will be delayed, I'm 
interested to merge those into 4.1.2 if possible

thanks
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





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


Re: Keeping track of Socket Timeout set time

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2011-06-26 at 13:22 +0530, Asankha C. Perera wrote:
> Hi All
> 
> I've come across this following case:
> 1. We establish an outgoing connection and set the socket timeout to 5 
> seconds (Time = t0 )
> 2. After receiving the response, we want to keep the socket open for 
> reuse for 30 seconds, and we update the timeout (Time = t1)
> 3. After 6 seconds since #2 above, we get an opportunity to reuse this 
> connection, and again we set the socket timeout to 5 seconds
> 4. Almost immediately, the BaseIOReactor timeout check most definitely 
> notices that the time the socket was last used (t1) is over 5 seconds 
> from the current time, and times out the socket
> 
> I've made a patch to overcome this, but would like to hear if there are 
> any comments on it before applying..
> 

Hi Asankha

The patch breaks API compatibility by adding an extra method to
IOSession interface. I do not want to turn API compatibility into a
complete absurdity, but we certainly cannot break API for patch
releases.  I am afraid we will have to resort to using an optional
interface in order to get additional details which are not exposed
through the IOSession interface. 

Please also raise a JIRA for this issue.

> PS: I've also been writing a ChunkDecoder capable of being a 
> FileContentDecoder.. and want to submit it for review.

Oh! That is a tough task last time I looked. Looking forward to the
patch. Do you also plan to enhance ChunkEncoder? 


>  Oleg, do you have 
> any plans of making the 4.1.2 release soon?
> 

Yes, within a week or two

Cheers

Oleg



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