🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #26518

Re: Diablo progress report

#26518
From: Matt Dillon
Date: Wed, 25 Feb 1998 00:00
61 lines
3621 bytes
:In article <6d2ij4$rh2$1@xs1.xs4all.nl>,
:Jan-Pieter Cornet  <johnpc@xs4all.nl> wrote:
:>In article <6d1n5m$69o$1@flea.best.net>, Matt Dillon <dillon@best.net> wrote:
:..
:>>    efficient, and (2) constant-sized index files are much more reliable then
:>>    append-style index files.  Because the file size does not change, the
:>>    meta-data can survive horrendous crashes with the end result being the loss
:>>    of just a few index records verses whole groups.
:>
:>When the circular buffer fills up before expire runs, you'll still need an
:>expensive and risky copy operation. But then again, that won't happen too
:>often if you allocate enough slack the moment the buffer starts rotating
:>(which is, I assume, when the articles start expiring the first time in
:>that group).

    Actually, I do a really cute programmer's trick... it's modulo N so 
    you have, say, 1000 fixed slots.  If you want to retrieve article N, 
    you look in slot (N % 1000).  The structure in the slot contains the 
    actual article number so you know if it's actually article N or article 
    N - 1000.  No copying required.

:>A disadvantage of this is that groups that get "bombed" might have their
:>circular overview-index buffer exploded (I know it happened to
:>alt.religion.scientology not very long ago). You might want to add the

    It's always possible, but if a group gets bombed that way the people
    reading it have other problems to contend with.  I'm not too worried.

:>possibility to shrink the buffer once usage drops below a certain point.
:>Also useful for busy groups that get phased out, or from which the busy
:>part is moved to another (new?)group.
:>
:>Other than that, the circular buffer idea sounds great. (Writing a binary
:>search for a circular buffer must be fun :)
:>
:>All the best,

    Ah, wait... I think there's some confusion here.  The *index* file is
    the circular buffer.... fixed size 16 byte structures which references
    the header information in a separate *data* file.  Each group has one
    index file and any number of data files.  Each data file holds up to
    256 article's worth of headers.

    No binary searches are involved.  The reader looks the article number up
    in the index file and seeks directly to the correct position in the
    appropriate data file.  There isn't much waste either, which is nice.

    expiration of data files will be simple:  stale data files representing 
    old articles are simply deleted.  The problem is in determining *when*
    the overview information is stale.

							-Matt

-- 
    Matthew Dillon   Engineering, BEST Internet Communications, Inc.
    <dillon@best.net>, include original article w/ any response.
    do not under any circumstances send email to joeblow@bigspender.idiom.com
    and, for gods sake, don't email bucktram@popserver.idiom.com

Technical Details
Message-ID: <6d2n9d$pqh$1@flea.best.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: <6clc7s$b96$1@apollo.backplane.com> <6d0sa2$1e2$1@xs1.xs4all.nl> <6d1n5m$69o$1@flea.best.net> <6d2ij4$rh2$1@xs1.xs4all.nl>

Show Full Headers
Complete Article Headers
Message-ID: <6d2n9d$pqh$1@flea.best.net>
Subject: Re: Diablo progress report
Date: Wed, 25 Feb 1998 00:00:00 +0000
From: dillon@best.net (Matt Dillon)
References: <6clc7s$b96$1@apollo.backplane.com> <6d0sa2$1e2$1@xs1.xs4all.nl> <6d1n5m$69o$1@flea.best.net> <6d2ij4$rh2$1@xs1.xs4all.nl>
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: 328720775
X-Trace: 888463470 20075 dillon 206.184.139.132
Organization: Best Internet Communications, Inc. - 650 964 BEST
Newsgroups: news.software.nntp