next up previous contents
Next: News Cache Architecture Up: Design Previous: Choice of Programming Language

News Server Architecture

  Before we will present the object-oriented design of the News Cache and its associated classes, we will explain the overall architecture of a news server. This should help to give an easier understanding of the News Cache's architecture since the News Cache is based on a similar structure itself.


    
Abbildung 5.2: General structure of a news server

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.% latex2html id marker 4074
\setcounter{footnote}{3}\fnsymbol{footnote}

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).

NewsServer
This object stores the current state of the news server and provides all functions necessary to retrieve articles and newsgroups. The state includes the currently selected newsgroup and the number of the currently selected article. The functions include retrieving the list of newsgroups, the overview database and the articles stored on the news server, and others.
Newsgroup
This object stores the articles and the overview database of the current newsgroup. It provides methods to access these informations.
Article
Stores a Usenet News article.
ActiveDB
This object stores the newsgroups available on a news server. For each newsgroup the type of the group (public, moderated, read-only) and the number of the first and last articles are stored. It provides methods to access these informations.
OverviewDB
Stores a summary of articles available within a newsgroup. It provides methods to access this information.

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.


  
Abbildung 5.3: State transition diagram for a news server
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/nserver_state.eps}
 \end{center}\end{figure}


next up previous contents
Next: News Cache Architecture Up: Design Previous: Choice of Programming Language
gschwind@infosys.tuwien.ac.at