next up previous contents
Next: News Server Class Library Up: Design Previous: News Server Architecture

News Cache Architecture

  The News Cache consists of several modules as shown in Figure 5.4. The Cache Daemon module handles requests from clients and passes these requests to the News Cache's controlling module (the CacheServer module). The CacheServer module checks whether the requested data are available in the local database, which is handled by the LocalServer module. Otherwise the requested data will be retrieved from the news server using the RemoteServer module.


  
Abbildung 5.4: Architecture of the News Cache
\begin{figure}
 \begin{center}
 \leavevmode
 
\epsfig {file=eps/arch_ncache.eps}
 \end{center}\end{figure}

The Cache Daemon object reads NNRP requests from its clients and transforms the request into appropriate calls to the CacheServer module. The result returned will be passed back to the clients.

The CacheServer module is responsible for the cache management. Whenever a request is being made to this module it checks whether the LocalServer module can fulfill the request. The LocalServer can fulfill the request if the requested data are already cached and the data have not timed out. As we have explained in section 4.1 data requested by the News Cache remains valid for a predefined period of time. If the request cannot be fulfilled by the LocalServer module the CacheServer module uses the RemoteServer module to retrieve the data. The fetched data are stored in the LocalServer's news database and passed back to the requester.

The LocalServer module gives access to a local news database and the RemoteServer module allows the retrieval of newsgroups and articles from a news server.

The architecture of the CacheServer, LocalServer and RemoteServer modules is based on the architecture of a News Server as explained in section 5.2, because they provide access to the news database in the same way as a news server does. Each module is implemented as separate class. For historical reasons these classes are called CServer , LServer , and RServer . Section 5.4 explains these classes in detail.


next up previous contents
Next: News Server Class Library Up: Design Previous: News Server Architecture
gschwind@infosys.tuwien.ac.at