Article View: news.software.nntp
Article #4118Re: If you could design a news server...
From: Greg Hudson
Date: Sat, 20 Jan 1996 00:00
Date: Sat, 20 Jan 1996 00:00
114 lines
5565 bytes
5565 bytes
Most of what I have to say here reflects the design choices I've actually made in my own news server (which is mostly functional but has no definite release schedule right now), which may be relevant to how you want to interpret these ideas. Also, I'm most certainly not the kind of person who would want to use a piece of proprietary software for a news server, so that may also color my advice. Brian Hernacki (bhern@netscape.com) wrote: : If you could design a news server, what kind of features would : you want it to have? : -interface From a protocol point of view, I'd prefer that news servers not try to separate the NNTP protocol into reader and server parts; suck feeds are an example of new uses which may not conform exactly to the model of "reader" and "server." From an administrative point of view, I think existing news servers are much too fragmented and correspondingly difficult to administer. I'd prefer to see the interface be a single executable; if the design calls for multiple process components, there should still be a front-end proces to manage them all, rather than a collection of entry points (rc.news, a cron job for nntpsend, a cron job for expire, etc.). Likewise, I'd prefer to see a single configuration file or, more generally, a single configuration interface for most or all of the functionality afforded by the news server. I will tell you up front that your most difficult interface challenge is going to be, "which newsgroups are carried by this server?" The administrator will want to be able to decide, and will also want to decide how to react to newgroup and rmgroup control messages. This is the only real case where both the administrator and the system have to be modifying a set of information. : -tools Although there's nothing of the sort in my news server, I think a lot of people would be interested in searching tools, both on the spool-walking and filtering level. : -logging facilities Most importantly, don't make the mistake of having a subsystem (like INN's nnrpd) log errors as if they were the whole news system. It is not a critical error if a client drops a connection and nnrpd has to exit. For proprietary software, you probably want to be able to adjust the logging levels for certain conditions. : -access control From an administrative point of view, you just want to be able to control read, write, and transfer operations on sets of groups. Not a difficult problem. The authentication problem is much harder, but I assume any product coming from Netscape will probably rely on SSL to solve that problem. : -speed/space features If you're not willing to throw away the old spool format, you're stuck with a slow and space-intensive news system. If you are willing to throw away the old spool format, the most efficient scheme is probably to store news articles in large buckets (in my server, buckets are named by expiry date to speed up the expire operation), with each bucket consisting of one file for each partition on the news server. That way you can balance disk accesses, avoid lots of expensive metadata operations, and possibly take advantage of prefetching and other locality optimizations provided by the system. A disadvantage of this approach is that removing articles from the spool becomes very difficult; note that article removal (except by expiry) is not the usual case, but a real database might still be preferrable. If possible, integrate the news server and feed system into one process. I think there's a tremendous speed hit in INN's feed system because of the separation between innd and nntplink/innxmit. Also if possible, avoid using more than, say, 100K of memory per reader (INN is awfully bad about this, using 1MB/reader on a big site). I solved this by integrating the server and reader system, but there may be performance problems with this approach. : -recovery tools Separate the spool from its indices (the index of message-IDs to articles and each newsgroup's index of articles and header information), and provide the ability to rebuild the indices from the spool. Think carefully about failure atomicity. When an article is fed to your system, commit its text to disk before acknowledging receipt of the article. Keep consistency pointers into each news bucket, and if the system goes down, refile each article past the consistency pointer into the various indices and re-propagate the article to remote news servers. : -automation of tasks This is an item I didn't deal with: a better system than expiry for dealing with the increasing volume of news. When you run out of space on your spool disks, what you really want is some kind of quota and preference system for determining which articles to discard first. There is actually a tool for expiring based on available disk space, but I don't know how flexible it is.
Technical Details
Message-ID:
<4dr1s1$rf2@senator-bedfellow.MIT.EDU>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<31005676.267@netscape.com>Show Full Headers
Complete Article Headers
Message-ID: <4dr1s1$rf2@senator-bedfellow.MIT.EDU> Subject: Re: If you could design a news server... Date: Sat, 20 Jan 1996 00:00:00 +0000 From: ghudson@mit.edu (Greg Hudson) References: <31005676.267@netscape.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 135887419 Distribution: inet Organization: Massachvsetts Institvte of Technology Newsgroups: news.software.nntp