From: Brian W. <bwe...@xb...> - 2007-08-31 17:50:37
|
On Fri, 31 Aug 2007, Marco Puggelli wrote: >> AXFR and IXFR are different enough from normal DNS queries that it >> doesn't make sense to expose them through the Resolver interface. AXFR >> originally was only possibly using a SimpleResolver, but when the >> ZoneTransferIn class was added, that functionality was deprecated >> (although it's still there), and IXFR was never added. >> >> The only reason why there's no getters for most of the SimpleResolver >> fields is because there's never been any need for them. Storing >> configuration things in a SimpleResolver so they don't need to be >> stored anywhere else and can be used by a different module isn't too >> convincing. > An example: if you need to implement some sort of dnsserver you would > have to load, for each zone, a nameservers list storing it somewhere for > later use (notify of changes to other ns, checks, updates and zone > transfers). > Which is the (almost) perfect solution? An ExtendedResolver, but this > way we cannot perform a zone transfer from one of its SimpleResolvers, > we need to maintain an external replica of the original array of > nameservers (each need at least an address, a port and a local address), > I see that a bit redundant. A DNS server needs to store more information than a list of namservers for each slave zone, and the object that manages the slave zone should keep track of such things. Storing things in an ExtendedResolver just because it happens to store the same fields for a completely different purpose is bad design. > so, I agree with you that there is normally no need to retrieve most of > the SimpleResolver fields, but since it's an object that represent a > nameserver, it should be possible to use it to perform not only simple > queries but zone tranfers also (sure, implemented externally, but using > its parameters). I thought that the two methods were the least invasive > solution. SimpleResolver is not an object that represents a name server. It's an implementation of an interface which performs DNS queries, specifically an implementation that sends all queries to a single server. There's a reason why the Resolver interface and its implementations are named as they are - they're objects representing (stub) resolvers, not name servers. Brian |