hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Olofsson <r...@khelekore.org>
Subject Re: [HttpCore] NIO extensions: event-driven non-blocking HTTP transport
Date Thu, 19 Oct 2006 20:19:59 GMT
Oleg Kalnichevski wrote:
> The I/O reactor works with abstract SocketAddress-es. HttpCore makes no
> assumption whether a particular SocketAddress represents a DNS host name
> or an IP address. The process of DNS name resolution is out of HttpCore
> scope. In practical terms that does mean the I/O thread can be blocked
> while a specific DNS name is being resolved. As this problem cannot be
> solved without an external dependency, I am personally prepared to live
> with this limitation.

This is a bit tricky. It would be good to have an interface that does
the lookup asynchronous. I do something like that in my proxy to spawn a
worker thread that does the lookup. DNS timeouts can easily be 2
minutes, handling many connections with that may be acceptable for
a simple client, but can easily be very bad if you want to build a web
spider or a web proxy or ...

Sam:
I use the dnsjava package to do dns lookups in rabbit. It is a dns
library in pure java. Internally it uses some parts of nio, but the
interfaces it provides are blocking calls.
I would like to have time to fix dnsjava to provide an asynchronous
interface, but as it is now I do not have the time.

http://www.xbill.org/dnsjava/

> Absolutely. I/O operations over NHttpConnections can be executed in full duplex.  

Glad to hear that.

/robo

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


Mime
View raw message