Skip to content
cdybedahl edited this page Jun 19, 2012 · 3 revisions

Improvement Areas

These are things in the current system that could use improvement, in no particular order.

Move individual gathering methods to independent plugin modules

It's already the case that all the various gathering methods consist of Perl methods that return nested hashes of data. It should not be hard to move them to their own modules. Combined with a plugin and registration system, it would also make it much easier to add further methods in the future. Today, adding a new gathering method requires both writing a method that implements the new method and returns the result from it in the form of a nested Perl hash, and adding a line in the for_domain() method that inserts it into the larger hash for a domain.

The above part has been done. When collecting, the system will load all visible modules with names of the form Zonestat::Collect::Something and call the class method collect in them. This method will be given two arguments (not counting the initial "self" argument), the name of the domain to gather information about and a reference to the top-level Zonestat object for the running collection. The method is expected to return a list with an even number of arguments, where the even-numbered elements (0, 2, 4,...) are names and the odd-numbered elements (1, 3, 5,...) are references to nested hashes of information. The names will be used as keys in the eventual result hash for the domain, and the hash references as the values for those keys.

It's less obvious how plugins would interact with the presentation layer, and that part has not been done.

Rewrite the dispatcher (again)

The dispatcher is still a hacked version of the DNSCheck dispatcher, and it certainly could use a clean rewrite. It may also be worth considering writing it in a language better suited to fault-tolerance and reliability, such as Erlang.

Performance

As always, performance can be improved. There are a few pages that take a handful of seconds to generate, and which could be usefully cached (the main selection page, for example).

Increase parallelism

While we have the ability to run lots of gathering processes in parallel, within each one everything happens sequentially. There might be gains to be had by running the various external tools we use in parallel instead.

Less rigid grouping

It would be nice of one could choose lists of domains and segments of time at presentation time, with the current sets and runs being mere default suggestions.