Hi
+1 for the API. I think it's reasonable because most of users won't care
of async DNS resolution.
+1 for the DNS subproject.
Julien
On Mon, 18 Feb 2008 13:57:42 +0900
이희승 "(Trustin Lee)" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 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("123.123.123.123", 8080) doesn't, which
> means that we can still keep SocketAddress as a standard interface to
> represent an endpoint.
>
> 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 resolution.
>
> 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.
>
> WDYT?
>