🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #519

Proposal: NNTP/RFC977 changes for nn newsreader

#519
From: Kim F. Storm
Date: Wed, 25 Apr 1990 20:30
106 lines
4691 bytes
This is a copy of a letter I have sent to brian@ucsd.edu

I have been told that RFC977 for NNTP is being reviewed, and that
you are the person to address about that.

As you may know, I am the author of the 'nn' news reader package,
which (transparently) will use NNTP if it is available (and the NNTP
code is compiled in).

The way nn works requires that a local database is maintained with
information for each article available on the NNTP server.

Normally, there is a big advantage of having the local database since
it will off-load the NNTP server because time-consuming tasks like
getting subject lists (the equivalent of rn's = command) and
processing of kill files is done locally from data in the database.

However, there are two cases where nn now must use existing NNTP
server requests to perform tasks, which could be done with a
significantly lesser load on the NNTP server if the requests suggested
below were available.


1) When it checks for new articles.

This is currently done by copying the active file from the NNTP server
to the local system (using LIST) where it is compared to a copy of the
previous active file read from the NNTP server.

This operation is normally performed every 10 minutes, and is of
course a waste of time if it turns out that the file hasn't changed.

When news is available locally, the check for new work is simply done
with a stat() call on the active file.  If it is the same as 10
minutes ago, then no new articles has arrived, so there is no need to
read the contents of the file.

* Proposal 1

	I would like to have a request which could return the mtime
	and the size of the active file on the nntp server, e.g.
	
		send "STAT"
		rcv OK
		rcv "%ld %ld", &mtime, &size

	Other information could be included here, but this is what
	I need for nn.


2) When it runs expire on the local database

When expire has run on the news system, nn's database must also be
expired to get rid of the information for the expired articles.

The way this is done on a local system is simply by reading the spool
directories and build a list of article numbers (things like i386,
8bit, and other directory names are of course ignored).  This list is
then sorted and entries in the database for articles which are not on
this list are removed.  Notice that no articles are accessed directly
to perform the local expire.

When NNTP is used, the only way (I know of) to get the list of all
existing articles is to use the XHDR request, specifically:
	GROUP some.news.group
	XHDR message-id 356-872
(if the current range of articles in the database is 356 to 872).

Since the only thing I am interested in is the article numbers, this
is a waste of time on the nntp server.  Instead of just reading the
spool directory (like nn does on a local system), it will open every
article in the group, parse the header, and extract a arbitrary field,
and return the information to nn.  And nn then just takes the article
number and ignores the information which the server went through so
much work to find.


* Proposal 2

	I would like to have a request which could simply return an
	unordered (!!) list of article numbers in the news group.
	
		send "LISTGROUP %s", group-name
		rcv OK_HEAD
		rcv "%ld", &article-number
		rcv "%ld", &article-number
		...
		rcv "."


I hope you will consider to adapt these suggestions in the RFC, since
I am sure the sysadm's on the NNTP servers will be happy for any
change that may decrease the load on their systems.

And if the current trend continues, the number of sites running nn is
growing rapidly.

--
Kim F. Storm        storm@texas.dk        Tel +45 42 91 7400
Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
	  No news is good news, but nn is better!

-- 
Kim F. Storm        storm@texas.dk        Tel +45 429 174 00
Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
	  No news is good news, but nn is better!
Technical Details
Message-ID: <518@texas.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm

Show Full Headers
Complete Article Headers
Message-ID: <518@texas.dk>
Subject: Proposal: NNTP/RFC977 changes for nn newsreader
Date: Wed, 25 Apr 1990 20:30:55 +0000
From: storm@texas.dk (Kim F. Storm)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
Newsgroups: news.software.nntp,news.software.nn
Summary: How to decrease load on nntp servers
Keywords: nn nntp
Distribution: news
Organization: Texas Instruments, Denmark
Lines: 106
Posted: Wed Apr 25 21:30:55 1990