🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38296

Re: News server architecture (was: Submitting to Freenix)

#38296
From: Aidan Cully
Date: Sun, 27 Jun 1999 00:00
48 lines
2894 bytes
In news.software.nntp, bill@twwells.com (T. William Wells) wrote:
> In article <7l5p6n$1kf$1@news.panix.com>, Aidan Cully <aidan@panix.com> wrote:
> : > > Lovely. Someone *needs* to look over code and say "You can't DO that!"
> : > > and this mmap() thing is exactly the sort of thing I'm referring to. I
> : > > can't conceive of any reason to *require* mmap in any system, since it
> : > > doesn't provide any *functionality* that regular I/O calls
> : > > provide. Efficiency, yes, but functionality no.  So code that *requires*
> : > > mmap() is *broken*.
> :
> : That's a bit harsh, and I can't say I agree with you..  Read "shared
> : memory w/disk backing" again. :-)
> 
> And what exactly do you think a buffer cache is?

Not shared.

> Oh, sure, there's
> some extra CPU involved in copying the data around but the reality
> is that the CPU time isn't the problem, the overview *data
> organization* is (was?) the problem.

The problem is that you end up working with copies that may or may
not be out of date, and to check if it's current you'd need to get
_another_ snapshot out of the buffer cache, and compare the two
copies you've made.  With the current organization of the overview
data, that looks like two read()s of the overview.IDX's header for
each read of the overview.DAT file.  That's fairly annoying.

> Sigh. I think I'm too old -- the programming school I come from
> believes in portability and correctness rather than convenience
> and hack-it-out-the-door. And, yes, one can have good, fast,
> portable, and *timely* code; good programming more often results
> in faster delivery time than not.

It's not bad code.  (I don't think it is, anyway.)  It just uses
mmap.  Given the way INN (and specifically nnrpd) work, I don't
consider that a bad design decision.

If we had a multi-connection nnrpd, then I'd consider it a bad
design decision.

--aidan
-- 
Aidan Cully       "Umm..  Could you call back?  My house is on fire."
Panix Staff          --Tom Waits
aidan@panix.com

Technical Details
Message-ID: <7l6716$4cd$1@news.panix.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: <7g24e7$ckh$1@info.cs.uofs.edu> <ylhfnukpwz.fsf@windlord.stanford.edu> <7l5p6n$1kf$1@news.panix.com> <7l5t2o$2f4m$1@twwells.com>

Show Full Headers
Complete Article Headers
Message-ID: <7l6716$4cd$1@news.panix.com>
Subject: Re: News server architecture (was: Submitting to Freenix)
Date: Sun, 27 Jun 1999 00:00:00 +0000
From: aidan@panix.com (Aidan Cully)
References: <7g24e7$ckh$1@info.cs.uofs.edu> <ylhfnukpwz.fsf@windlord.stanford.edu> <7l5p6n$1kf$1@news.panix.com> <7l5t2o$2f4m$1@twwells.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: 494552929
Distribution: inet
X-Complaints-To: abuse@panix.com
X-Trace: news.panix.com 930520934 4493 166.84.0.232 (27 Jun 1999 22:02:14 GMT)
Organization: Public Access Networks Corp.
NNTP-Posting-Date: 27 Jun 1999 22:02:14 GMT
Newsgroups: news.software.nntp