Simple Example Diablo Reader Installation
At first glance, the Diablo reader appears quite complex, but after
learning some of the concepts and methods behind the way things are
done, the process is actually very simple.
The main concept to grasp is that the diablo reader is really
only a frontend to a backend spool. i.e: something similar, but not
quite the same, as a cache server. The frontend basically only
keeps track of the article headers and which articles are in
which groups. Most of the client browsing consists of looking
at article subject lines within a group and downloading the
occasional article. Because dreaderd has its own copies of
the headers, the Subjects can be provided very easily and quickly
from the local "cache".
This example assumes two servers:
- a spool server, which also acts as the header feed to the
reader and does the article numbering. The machine will be
called "feeder.example.com".
- a reader frontend that accepts a header feed from the spool,
deals with client connections and requests, fetches articles
from the spool and sends postings back to the spool for
relaying to the world and back to the reader frontend.
This machine is named "reader.example.com".
Some of the above functions can be split off into separate
servers. e.g: The number master and header feeder could be
2 different machines. For this example, we are limited to
2 machines, so we get the spool doing the same functions.
Spool Server Installation
Note that the spool server for a diablo reader can exist on the
same machine as the reader, but for this example, we will assume
they exist on separate machines. The concept is the same because
the spool and reader on the same machine are distinct sub-systems,
that only interact with each other through NNTP and perhaps share
a couple of configuration files.
We need to setup the following:
- accept articles from a news peer (our incoming newsfeed)
- filter incoming articles for spam
- store the articles on the spool, separating binaries and text
articles into different partitions.
- provide a header feed to the reader
- accept posts from the reader
- forward posts from the reader back to our peer
- generate article numbers are store them in the Xref: header
The configuration files required are:
- diablo.config - the main
configuration - handles step (7) and other configuration options
- dnewsfeeds - handles steps (1), (2), (4),
(5) and (6)
- dspool.ctl - handles step (3)
A crontab (see the sample crontab in the adm/ directory) needs to
be setup to run:
- hourly.expire - expire old articles on the spool objects and maintain
free space
- biweekly.atrim - rebuild history, cleaning out older articles
- dspoolout - push outgoing newsfeeds
The server needs to be started with the following command-line (modify
in the rc.news script):
dbin/diablo -p feeder.example.com server "-s "
substituting 'feeder.example.com' for the entry that needs to go into the
Path: line for this host (usually the local hostname.domain).
Reader Installation
For a reader to handle client requests, we need to setup the following:
- Accept an incoming header feed
- Accept connections from clients
- Create connections the spool server to retrieve articles
- Create connections the spool server to post articles
- Expire old articles
The configuration files required are:
A crontab (see the sample crontab in the adm/ directory) needs to
be setup to run:
- daily.reader - expire old headers and resize indexes
- weekly.reader - rebuild header db files
The server needs to be started with the following command-line (modify
in the rc.news script):
dbin/dreaderd -x master.example.com -p reader.example.com -s " "
Note that the '-x' line must match with the feederxrefhost specified in
diablo.config for the spool/feeder.