next up previous contents
Next: News Database Up: Design Previous: News Cache Architecture

Subsections

News Server Class Library

  As explained in section 5.3, the architecture of the News Cache is based on several news server objects providing an interface to different kinds of news databases. Each of these objects will be implemented using their own class and all these classes together will form the News Server Class Library .

Figure 5.5 shows the hierarchy for the classes of the News Server Class Library . The base of all news server class types is an abstract class called NServer . This class defines a general interface to a news database that has to be implemented by all of its subclasses.


  
Abbildung 5.5: Hierarchy of the News Server classes
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/class_hierarchy.eps}
 \end{center}\end{figure}

News Server Class (NServer )

The NServer class does not implement the access to any news database. It defines only the interface for the methods necessary to access a news database. The methods are defined as virtual to allow the exploitation of polymorphism across the News Server classes. This gives the possibility to write functions and methods that operate on any news server class. Depending on the exact class given to those functions the appropriate class method will be called.

Remote Server Class (RServer )

The RServer class uses a news server as its news database. Newsgroups and articles will be retrieved from the news server using NNRP. Hence this class may be used in programs that need to access a news server (e.g., the news reader, proxy news server, etc.). Figure 5.6 shows this configuration.


  
Abbildung 5.6: News reader using the RServer class
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/rserver_usage.eps}
 \end{center}\end{figure}

Local Server Class (LServer )

The LServer class uses a local news database. This class may be used in programs that need to access a local news database (e.g., a news server, etc.). Figure 5.7 shows this configuration.


  
Abbildung 5.7: News server using the LServer Class to access the local news database
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/lserver_usage.eps}
 \end{center}\end{figure}

Cache Server Class (CServer )

The CServer class retrieves newsgroups and articles from a news server and caches these data in its own local news database. It is built on top of the RServer class, which is used to retrieve the data from the news server and on top of the LServer class, which is used for the local news database. Using this class it is possible to implement a news reader with a local cache or even a cache server for the News System. Figure 5.8 shows an example.


  
Abbildung 5.8: News Cache using the CServer class for its database
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/cserver_usage.eps}
 \end{center}\end{figure}


next up previous contents
Next: News Database Up: Design Previous: News Cache Architecture
gschwind@infosys.tuwien.ac.at