🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #7417

Re: Storage of Usenet News Articles by MD5 Hash

#7417
From: Scott Lystig Fritchie
Date: Thu, 09 May 1996 00:00
83 lines
4035 bytes
>> jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) said in
>> <4mrljr$ho@olivea.ATC.Olivetti.Com>:

> A while back I proposed that it would be more effient to store
> articles by message ID instead of article numbers in a newsgroup.

For those gentle readers who missed my posting of patches relative to
INN1.4 this implement this, see
http://www.mr.net/~fritchie/HASHHACK/.

> One could instead generate the directory based on the time of article
> arrival.  By example suppose we generate the directory name based on the
> day of month, hour, and minute. [...]
> The advantage over the message ID is that articles are stored grouped
> by arrival time instead of by newsgroup.  For a feed site this means that
> not only does storage result in less seeks but transmission as well.  The
> queue of a newsfeed will also be generated in directory sequence without
> having to sort it.

Ja, that's a clever way to do it.  The main disadvantage, IMHO, would
be the loss of the even disk distribution, though if the folks
upstream from you aren't sorting their feeds to you, you'll probably
receive a pretty even mix.

One potential big advantage would be the assistance of the expiration
process.  Just as I-can't-recall-his-name wrote in his Dr. Dobb's
article about a custom filesystem on top of QNX, when you want to
expire a group of articles, just delete the file.  In Jerry's case,
you'd just recursively remove an entire directory.  The major work, if
you can call it that, would be to remove old entries from your history
and overview files.

Borrowing from the QNX idea, if you named the directory for when the
articles would be removed ... and if you wanted to be more selective
with your expiration policy, say alt.* expires in 5 days, the major
hierarchies in 7 days, and everything else (plus the newuser
announcements) in 10 days, create a directory scheme which would look
like this:

                     |-00-
                     |
                     |-01-|-00-
        |-now+10days-|    |-10-
        |            |-02-
        |            |-03-
        |
        |            |-00-
        |            |
        |            |-01-|-00-
|-spool-|-now+5days--|    |-10-
        |            |-02-
        |            |-03-
        |
        |            |-00-
        |            |
        |            |-01-|-00-
        |-now+7days--|    |-10-
                     |-02-
                     |-03-

... where "now+5days" would be a better encoding for the first level
:-), the second level as the hour of arrival (first 4 hours shown),
and the third level as minutes of the arrival (in groups of 10, to
avoid making a gazillion-line long posting).

> For a feed only system this would seem to be superior to the current
> system or to hashing the ID.  I would expect perhaps a 5 times or more
> improvement over the current scheme.

I've got bigger fish to fry, and we're still a bit short-staffed, so
I'll pass on this.  Anyone who's interested in trying this scheme out
should grab my MD5 hash hacks and go from there.  Trust me folks, it's
pretty darn easy.

-Scott
---
Scott Lystig Fritchie, Network Engineer          Minnesota Regional Network
fritchie@mr.net, PGP key #152B8725               2829 University Ave SE
v: 612/362.5820, p: 612/637.9547                 Minneapolis, MN  55414
http://www.mr.net/~fritchie/

Technical Details
Message-ID: <ytlu3xqbblg.fsf@data.mr.net>
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
References: <4mrljr$ho@olivea.ATC.Olivetti.Com>

Show Full Headers
Complete Article Headers
Message-ID: <ytlu3xqbblg.fsf@data.mr.net>
Subject: Re: Storage of Usenet News Articles by MD5 Hash
Date: Thu, 09 May 1996 00:00:00 +0000
From: fritchie@MR.Net (Scott Lystig Fritchie)
References: <4mrljr$ho@olivea.ATC.Olivetti.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: 153842868
Distribution: inet
Sender: fritchie@data
Organization: Minnesota Regional Network
Newsgroups: news.software.nntp