--- Oleg Kalnichevski <[EMAIL PROTECTED]> wrote: > On Wed, 2007-02-21 at 17:13 -0500, > [EMAIL PROTECTED] wrote: > > Hi! ... > > This code successfully detects closed and > aborted/reset connections, and > > runs in < 1 ms. ... > Unfortunately we cannot use NIO in HttpClient 3.x > because of the Java > 1.2.2 compatibility requirement. The stale > connection check will always > remain slow due to the inherent limitations of the > blocking I/O in Java > (in many JRE implementations the effective socket > timeout granularity is > 15 - 30ms). There is not much we can do about it.
This may be too late for HttpClient 3.x, but if not, would it be easy to allow pluggability of the staleness checks (I have not checked the code -- if it already is, apologies for a newbie question)? For many users, Jdk 1.4. requirement would be quite acceptable, and perhaps such a plug-in could be made accessible as a separate contribution. So it would not be part of the core, but available for those who need it. I mention this because I know this particular issue is a rather important one -- for example, at my current (big, fortune 500) company, there is even recommendation is to turn off http 1.1 persistence altogether (when using httpclient), because of this additional latency. ;-/ (or, rather, it's mentioned in a big http access FAQ as one of the things that can noticeably increase latency; being especially problematic with services whose SLA is, say, 10 ms, at 99% fractile). Also -- as to HttpClient 4.x, it looks as if baseline JDK requirement for blocking part is kept as 1.3. Since this improvement would seem like very useful one (assuming toggling of channel status is a fast operation), is there are any change this feature could be included as dynamically loaded plug-in? (if the requirement can not be increased). I know it is quite easy to dynamically load different implementations (construct an implementation factory as a singleton, starting with latest version; later on use whatever version jvm was able to load -- I used this to use LinkedHashMap if available, etc, for another project). I would assume pluggability is covered by 4.x design itself, so perhaps that's good enough. -+ Tatu +- ____________________________________________________________________________________ Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
