next up previous contents
Next: News Server Class Library Up: Implementation Previous: Programming Language

News Cache Daemon

  As explained in section 5.3, the News Cache consists of several modules (Figure 6.1).


  
Abbildung 6.1: The News Cache Daemon
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/imp_ncache.eps}
 \end{center}\end{figure}

The Cache Daemon module interprets commands received from news clients. The heart of this module is the dispatching function (nnrpd) that decides which function is responsible for what command. This decision is based on a jump table stored in the nnrp_commands variable. Since C++ does not support calling methods using jump tables (this is due to the implicit this parameter) we did not implement this module using its own class. The Cache Daemon module is only responsible for the NNRP protocol and the multiplexing between different news servers.

The News Cache uses the CacheServer module to maintain its news database and to retrieve newsgroups and articles from the news server (Figure 6.1). The news database itself is stored using the active, overview and article database.

The multiplexing between different news servers is performed using the MPList class. Whenever a news group is selected by the client, the News Cache uses an MPList to find the appropriate news server. The appropriate news server is selected using the CServer 's setserver method.

Since we have decided to use one process for each client, the News Cache either can be started from inetd or can run as standalone server.


next up previous contents
Next: News Server Class Library Up: Implementation Previous: Programming Language
gschwind@infosys.tuwien.ac.at