🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #85771

Re: Starting: New NNTP server development

#85771
From: Russ Allbery
Date: Wed, 10 Jul 2013 07:39
40 lines
3071 bytes
Jarle Aase <jgaa@jgaa.com> writes:

> Design decisions:
>  - Database storage for meta-data and small text posts (MariaDB?)

There are several aspects of the Usenet data model that benefit greatly
from a highly optimized index.  The history database and the overview
database are the biggest ones.  While I know SQL databases have been tuned
very well, and they've gotten a lot faster, all the previous experiments
I'm aware of with using generic SQL databases for those indices failed to
achieve anywhere near the speed of even ancient and crufty specialized
databases like dbz.

If I were you, I'd take a serious look at lmdb.  It's probably what I'd
use for both history and overview if I were writing a new news server from
scratch today.

    http://symas.com/mdb/

It's now used by OpenLDAP and is massively faster than Berkeley DB for a
similar type of system that requires extremely fast queries, and Berkeley
DB in turn was always massively faster than a generic SQL database for
LDAP.

However, you'd lose Windows compatibility there, since LMDB depends
heavily on UNIX data management models (mmap and fdatasync at least).

You should also seriously consider designing your news server to be
threaded from the start.  It's almost impossible to retrofit threading to
code, and threading is a very natural fit for a typical news server load
profile (multiple streams of almost entirely independent operation with a
small shared hot cache of synchronized data).  All of the fastest news
servers that I've heard of were threaded rather than using INN's much
older select loop model or Diablo's (IIRC) multi-process model.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <8761wix3r9.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.glorb.com!usenet.killfile.org!usenet-its.stanford.edu!.POSTED!not-for-mail
References: <krj2c7$mao$1@speranza.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <8761wix3r9.fsf@windlord.stanford.edu>
Subject: Re: Starting: New NNTP server development
Date: Wed, 10 Jul 2013 00:39:38 -0700
From: Russ Allbery <rra@stanford.edu>
References: <krj2c7$mao$1@speranza.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.glorb.com!usenet.killfile.org!usenet-its.stanford.edu!.POSTED!not-for-mail
Newsgroups: alt.comp.jgaa,news.software.nntp
Organization: The Eyrie
Lines: 40
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: usenet-its.stanford.edu 1373441983 10155 171.67.225.134 (10 Jul 2013
X-Complaints-To: news@usenet-its.stanford.edu
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Cancel-Lock: sha1:Agp/K6nqSj187ItYyUsfpA2fFVM=
X-Original-Bytes: 2777