🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #46393

Re: Diablo spool

#46393
From: Joe Greco
Date: Thu, 11 May 2000 00:00
75 lines
4147 bytes
In news.software.nntp article <brad-881E22.12014311052000@news.skynet.be>, Brad Knowles <brad@shub-internet.org> wrote:
:In article <3918dfe1$0$88605@news.execpc.com>, jgreco@ns.sol.net (Joe 
:Greco) wrote:
:
:> Yes, check out DiabloSpoolDirs.
:> 
:> Unfortunately, it's somewhat broken in 2.0, because I biffed a merge by
:> giving Russell the wrong code and then nobody gave me time to actually
:> test the 2.0 stuff in production, since we were all so worried about the
:> extended reader functionality (sigh).
:
:    Yeah, this was one of the things that caused me to recently put a 
:halt to my attempts to test Diablo 2.0.  I've gotten busy with some 
:other problems since then, and haven't gotten back to it.
:
:    However, in the meantime I'd really like to know how this option 
:works.

Implementation is conceptually simple (and much of the code is too).

Diablo maintains locality on its spool by making directories of the
form "D.xxxxxxxx", where xxxxxxxx is a hex quantity that represents
time and some other stuff.  Articles received within a specific time
frame get written into this directory.

Expiration is handled by removing entire directories at a time, which
is fine since the tendency is for new dirs to be created ~~ every 20
minutes.  It is very fast, very efficient.  Then, the history is forced
to be reconciled with the current contents of the spool, again, in a
reasonably fast and efficient manner.

To retain the locality benefits, and because I didn't want to introduce
new and unexpected complexities into the code, I chose to simply take
that hex number, mod it against a variable, and wind up with

N.xx/D.yyyyyyyy

where xx is yyyyyyyy % DiabloSpoolDirs.  This made most of the code
trivial to modify, and left the complex stuff to dexpire, which then
had to know how to monitor for space on a per-filesystem basis, and
had to know how to recurse down into those directories.

Unfortunately, I blew it.  There is something goofy that goes on in
the sequence numbers (and I bothered to figure out why, once, and
then promptly forgot why)...  they tend to end up being even numbers.
So a straight mod places content in every other N.xx directory.  The
fix is simple and trivial, you simply divide by two before the mod.

So I'm not really sure where I dug up the wrong code, since I had been
using the right code in production for a Very Long Time.  But these
things happen.  Sigh!

:> Downside:  it is not designed to be "flexible".  It assumes that you are
:> giving it N identical filesystems.  It isn't policy driven (like "put
:> alt.binaries on filesystem 2")...  it just extends the existing Diablo
:> spool paradigm to multiple filesystems.
:
:    Based on your previous comments, I had anticipated that, and set up 
:the filesystems appropriately.  This should be just fine.
:
:> If you need a correct and current snapshot, holler and it will find its
:> way to you.
:
:    HOLLER!  ;-)

Huuuh.  I was going to be a smartie and tell you to check it out yourself.
But you don't have an account.  How'd that not happen?

Send me your preferred login, a crypted pw, your preferred shell, and an
IP address that you would be ssh'ing from to me via e-mail.  I will set
you up an account and you can get the code yourself.

... JG

Technical Details
Message-ID: <391af10b$0$63134@news.execpc.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
References: <957925631.861148@news.netscum.dk> <3918dfe1$0$88605@news.execpc.com> <brad-881E22.12014311052000@news.skynet.be>

Show Full Headers
Complete Article Headers
Message-ID: <391af10b$0$63134@news.execpc.com>
Subject: Re: Diablo spool
Date: Thu, 11 May 2000 00:00:00 +0000
From: jgreco@ns.sol.net (Joe Greco)
References: <957925631.861148@news.netscum.dk> <3918dfe1$0$88605@news.execpc.com> <brad-881E22.12014311052000@news.skynet.be>
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: 622198882
Sender: jgreco@earth.execpc.com
X-Trace: Tl\okXWcmLgI5[332>a9YkbfNiaEHUgJgRYcgIRLSUEmAl:H2nQN`JcY9F=STY<;Ql3LX7T::^=KlGhaMU<hZ^NgF4FfQ?Mh6Um
Organization: sol.net Network Services - Milwaukee, WI
Newsgroups: news.software.nntp
X-Complaints-To: abuse@execpc.com