Figure 5.2(a) shows the relationship between newsgroups and articles as EER diagram and suggest the use of a relational database as a simple approach. Newsgroups and articles are stored in the Newsgroup and the Article table, respectively. The relation between newsgroups and articles is stored in another table.
The database has to be able to maintain about 35000 newsgroups,
2.5 million articles and a table mapping the m:n
-relationship
between newsgroups and articles with approximately 3.5 million
entries.
Since not everybody who wants to run a News Cache should be forced to buy such a powerful database, we have decided to design and implement our own database for the management of the newsgroups and articles. This database will partially be based on the filesystem. The design of this database will be shown in section 5.5 and its implementation in section 6.5.
Figure 5.2(b) shows the architecture of a news server using an object-oriented model. Connections to the news clients are handled by the NewsServer object, while the news database is handled by other objects.
The ActiveDB object is used to maintain the list of available newsgroups (Active Database) and the Newsgroup object is used for the maintenance of the currently selected newsgroup. The Newsgroup object uses an OverviewDB object to manage a summary of available articles and an Article object for the maintenance of the currently selected article. The relationships are indicated by the use of a has a association arc. The user of another object is marked using a filled circle.
In the following we will describe the objects shown in Figure 5.2(b).
Figure 5.3 shows the behavior of a news server as
a finite state diagram. In the news server's initial state no
newsgroup is selected. If a newsgroup is selected by the client, the
successive listgroup
, xover
and article
commands
will work on the newly selected newsgroup.