hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-21) have connections count requests
Date Mon, 25 Jun 2007 15:41:26 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507904
] 

Oleg Kalnichevski commented on HTTPCORE-21:
-------------------------------------------

Just some more thoughts on the problem of collecting transport metrics for NIO connections.


A decorator around ByteChannel would have been the cleanest solution to the problem by far.
But this would effectively eliminate all performance gains from using FileChannel's #transferFrom()
and #transferTo() methods. The only alternative to decorating the channel is to track every
single I/O operation on the session's channel and update transport metrics accordingly. This
requires some fairly ugly code in DefaultNHttpClientConnection, DefaultNHttpServerConnection,
LengthDelimited and Identity codecs, but I do not see any other alternative to that.

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, metricstests.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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message