🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #37137

Re: Abandoning uniover - but how?

#37137
From: cengiz
Date: Thu, 29 Apr 1999 00:00
90 lines
5305 bytes
In a previous article, T. William Wells <bill@twwells.com> writes:
>: > rather than a channel feed, is more than sufficiently efficient.
>: > OTOH, I can think of several alternative methods, right off the
>: > top of my head, that have the advantages of the 1.x along with the
>: > purported advantages of the 2.x method. Heck, maybe after dinner,
>: > I'll sketch out one or two....
>
>Well, here's a proposal: Get rid of overchan entirely. Let nnrpd
>have the responsibility of reading *and* creating the overview.
>This would seem to be about as efficient as one can get, since
>exactly those articles that need overview records get them and
>none others do. In this method, the overview database is, in
>essence, one big shared cache used exclusively by nnrpd.

But what about the initial read that causes it to be created?
That's going to take a long time when reading overview data
for 1,500 articles when no cache exists yet.

>There are a number of considerations:
>
>1) If overview data is handled at article receipt time, there is a
>good chance the article is in the disk cache, thus not requiring
>yet more disk accesses to build the overview data. This is
>somewhat countered by there being a reasonable chance that if the
>article is read for creating overview data, the article is also
>likely to be read (from the disk cache) in order to be sent to the
>client.

But clients don't read articles 1,000 at a time.  Article retrieval
time is not a major practical concern.  If it takes an entire
second to read an article, that's fine.  The more important issue
here is the time to create/send overview data because that's done
for large numbers of articles.

That's why I like the 1.X method.  Better to take some relatively
small performance hit and spread it out over time, while articles
come in, then leave it until the article overview is requested.

>2) If a group is very active but not read and then someone comes
>along and reads it, that person is going to wait a long time (as
>with the 2.x overview) for the overview data to be built. This can
>be countered by a program that keeps track of group activity and
>when it feels that a group is getting too far behind on overview,
>just connects to nnrpd and issues the necessary XOVER commands.

Bingo-  or one that just goes behind and rotates through all the
groups doing the same would eliminate waits entirely.

>3) Since nnrpd is now managing the overview database, it has to
>handle locking between instances. The sequence needs to be
>something like this: grab the lock, find the final record in the
>overview file, scan the spool from that point, append records to
>the overview file, release the lock. (You want to do the lock
>before scanning the spool since otherwise several nnrpd's could
>think they need to do a scan, at the same time.) Of course, this
>requires a working lock method....
>
>4) Something needs to be done about cancelled articles. Marking
>the overview entry in-place would work, so long as it is done with
>system writes and not standard I/O buffered writes. The mark would
>occur when nnrpd tries to fetch the article and doesn't find it.
>Since the write is in-place, no locking is needed for this.

This and expires can be handled on the fly.

What I'm leaning towards is a separate external program that connects
to nnrpd and gets overview using the current, unmodified nnrpd from 2.x.
It then writes a 1.x-style overview database, elminating entries not
returned by the listgroup command.  It would just start at the top
of the active file, updating one group at a time, and then start back
at the top when it was done.

The most intensive run would be the first loop, since it would be building
overview data for the entire spool then.  After that, each loop just
adds new article overview data.

For my purposes, btw, my main use of the data would be by direct disk
access, so I don't need to modify nnrpd to use it.  But that would
be the next thing to make this complete.  Perhaps make an xover2 command
implement access to unified overview, and xover to read the old-style
database, only supplementing it with the latest entries from uniover.

-Cengiz

      -----  Posted via NewsOne.Net: Free Usenet News via the Web  -----
      -----  http://newsone.net/ --  Discussions on every subject. -----
   NewsOne.Net prohibits users from posting spam.  If this or other articles
 posted through NewsOne.Net violate posting guidelines, email abuse@newsone.net

Technical Details
Message-ID: <7ga14u$h7f$1@news.netmar.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

Show Full Headers
Complete Article Headers
Message-ID: <7ga14u$h7f$1@news.netmar.com>
Subject: Re: Abandoning uniover - but how?
Date: Thu, 29 Apr 1999 00:00:00 +0000
From: cengiz@netmar.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: 472346049
X-PNG: news.software.nntp
X-Complaints-To: usenet@news.netmar.com
X-Trace: news.netmar.com 925403102 17647 205.139.138.14 (29 Apr 1999 16:25:02 GMT)
Organization: NewsOne.Net - Free Usenet News via the Web - http://newsone.net/
X-MCC: bill@twwells.com
NNTP-Posting-Date: 29 Apr 1999 16:25:02 GMT
Newsgroups: news.software.nntp