Library Design

Here is a short description of the ZoneMaster library design. First of all here is one of my UML diagrams that might help you get the overall picture of what is going on internally.

As you can see in this picture there the two packages Bind::Zone and Bind::Config which provide the functionality required to manage Zonefiles and the Configuration file of the Bind name service. The ZoneMaster::Database package at the top contains all classes that are used to keep the data persistent in a relational database. The fourth package called ZoneMaster contains classes for caching and job handling .

Bind::Zone

There is a class representing a zone. It contains none or multiple instances of the class Label. The Label class contains none or multiple instances of the Record class.. The File instance is responsible for transforming the zone into its file representation.

Bind::Config

In this package there is a class representing the Bind configuration. It contains statements that might be of type ZoneStatement, OptionsStatement or simply Statement in case they are of no known type. The ZoneStatement contains a link to the Zone instance. Then there is a Server instance that is associated with the Config instance and vice versa. Each Zone instance contains a reference to its Servers. Again the File instance is responsible for transforming the Config into its file representation.

ZoneMaster::Database

This package contains a facade object called Database that hides the persistance mechanism. This mechanism consists of a Connection that is responsible for SQL-related things in general and some adaptor classes that are responsible for type specific things. If the Database is asked to store a certain object it creates the associated adaptor instance, provides the Connection and asks the adaptor to insert the object.

ZoneMaster

This package contains the Broker and the Cache. These two are responsible for caching the objects in use (read cache). The caching mechanism is at an early state at the moment primarily because I am not sure so far if caching is useful for this application. The third class represents Jobs. The Jobs are used to insert or delete objects.

If you have any comments or questions regarding the design don't hesitate to contact me by mail.


Changed 28.07.2002 -aw