mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 이희승 "(Trustin Lee)" <trus...@gmail.com>
Subject Asynchronous DNS query as a separate submodule
Date Mon, 18 Feb 2008 04:57:42 GMT

I thought about incorporating asynchronous DNS query feature into MINA
core, and reached to the temporary conclusion that it might be a better
idea to keep it as a separate submodule.

The reasoning behind this idea is that InetSocketAddress() doesn't query
DNS server at all if an IP address is specified.  For example, new
InetSocketAddress("gleamynode.net", 8080) causes a DNS lookup, but new
InetSocketAddress("", 8080) doesn't, which means that we
can still keep SocketAddress as a standard interface to represent an

In the separate module, user could request asynchronous DNS query like
the following:

DnsResolver resolver = ...;
Future<InetAddress> f = resolver.query("gleamynode.net");
// returns an InetAddress with an IP address rather than with host name.
InetAddress address = f.get();

By providing this submodule rather than changing the core:

1) Most users are happy that they don't need to change anything.
2) Some users who needs asynchronous domain name resolution can use the
submodule for better simultaneous, asynchronous, complicated domain

We could provide it as a subproject, but in this case, providing it as a
submodule will make MINA more complete network application framework.
On the other point, it's also the implementation of DNS protocol, so it
might be a better idea to provide it as a subproject.


Trustin Lee - Principal Software Engineer, JBoss, Red Hat
what we call human nature is actually human habit

View raw message