hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: DNS // NIO
Date Fri, 25 Jul 2003 18:17:59 GMT

Please see my comments below

On Fri, 2003-07-25 at 19:24, Clemens Marschner wrote:
> Hi,
> there are two issues I would like to bring up that were mentioned in this
> list during the last months but were never resolved:
> 1. Java DNS handling as done by java.net.Socket is very inefficient for
> <snip>
> This could be avoided by issueing only the IP address to java.net.Socket and
> thus to HTTPClient. However, it is necessary to pass the host name to
> HTTPClient in order to resolve multiple host names per IP address within the
> HTTP request.
> Do you have any plans to plug in an external DNS resolver and create a
> Socket only with the IP address?

The issue of custom DNS resolver has been discussed on several
occasions. The consensus was (if my memory does not fail me) that domain
name resolution was clearly out of HttpClient's scope. Instead we have
provided a way to plug in a custom DN resolution mechanism by supporting
virtual host names in the target host's configuration.

HostConfiguration hostconfig = new HostConfiguration();
hostconfig.setHost("", "www.whatever.com", 80,
HttpClient agent = new HttpClient();

> 2. Are there any people working on a NIO based version of HTTPClient? I saw
> some notes on this on a weblog, but haven't seen any results.

Our goal is to provide Java 1.2 compatibility as long as the project
reliant on HttpClient require it. That puts NIO support pretty much out
of question for a considerable period of time to come. This said,
however, we are planning to provide a means of plugging in a custom
HttpConnection implementation in 3.x release, which would allow NIO
based implementation to be used instead of official Java 1.2 compatible

More good stuff will be coming in the 3.x release. It can well make
bearing with us worthwhile.



View raw message