[
https://issues.apache.org/jira/browse/HTTPCORE-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski updated HTTPCORE-21:
--------------------------------------
Fix Version/s: (was: 4.0-alpha5)
4.0-beta1
Folks,
I have put together request / response metrics for both blocking and
non-blocking connection. Andrea kindly contributed byte sent / received metrics
for blocking data receiver and transmitter.
Now the bad news. Implementing transport metrics for non-blocking connections
turned out to be a major pain in the rectum. One can add the counts to all
individual message parsers and content codecs, which will get VERY messy in no
time. I am very reluctant to go that route. There is a much cleaner approach to
solve the problem: decorate the I/O channel associated with the I/O session.
The trouble here is that this would most definitely kill all performance gains
of using FileChannel's #transferFrom() and #transferTo(). I suspect very
strongly these methods would actually expect an instance of SocetChannel to be
able to do their magic. I do not see an acceptable way of solving the problem
at the moment. My current preference is to not support transport counts on
non-blocking connections at all (at least until a better solution presents
itself).
Oleg
> have connections count requests
> -------------------------------
>
> Key: HTTPCORE-21
> URL: https://issues.apache.org/jira/browse/HTTPCORE-21
> Project: HttpComponents Core
> Issue Type: Wish
> Components: HttpCore
> Affects Versions: 4.0-alpha3
> Reporter: Roland Weber
> Assignee: Oleg Kalnichevski
> Priority: Minor
> Fix For: 4.0-beta1
>
> Attachments: 2k6-12-28-reqcnt-1.txt, metrics.patch, metrics_v2.patch
>
>
> It would be nice if connections would count the requests sent since they were
> opened. This would greatly simplify the implementation of reuse strategies
> like "reuse for at most 5 requests". While it is possible to count requests
> elsewhere, that is clumsy and error prone. For example the HttpContext is not
> a good place to keep the request count, since the connection may be released
> to and re-acquired from a connection manager, so the previously used context
> is lost.
> patch follows
> cheers,
> Roland
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]