🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #85780

Re: Starting: New NNTP server development

#85780
From: Jarle Aase
Date: Thu, 11 Jul 2013 04:15
60 lines
4072 bytes
Den 10.07.2013 10:39, skrev Russ Allbery:
> 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/

This looks very interesting indeed.

> 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).

Windows does have memory-mapped files.

I have not looked at lmdb's source code yet, so I dont'k know if it's 
doable to port it. Anyway, I see no problem by using optimal platform 
specific libraries / technologies.

> You should also seriously consider designing your news server to be
> threaded from the start.

Yes, I will. I will use the threading support in C++11, and probably one 
task sequencer for each core (by default). This is a very simple model 
that allows most of the code to be written as if the application is 
single-threaded, without mutexes all over the place - while still 
distributing the load over all the available hardware-threads.

> 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.

Thanks for your suggestions.

jgaa
-- 
Jarle Aase
Author of free software

<<< no need to argue - just kill'em all >>>
Technical Details
Message-ID: <51DE3156.10704@jgaa.com>
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.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
References: <krj2c7$mao$1@speranza.aioe.org> <8761wix3r9.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <51DE3156.10704@jgaa.com>
Subject: Re: Starting: New NNTP server development
Date: Thu, 11 Jul 2013 07:15:18 +0300
From: Jarle Aase <jgaa@jgaa.com>
References: <krj2c7$mao$1@speranza.aioe.org> <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.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 10 Jul 2013 23:15:20 -0500
Organization: Jgaa's Internet
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
MIME-Version: 1.0
Newsgroups: alt.comp.jgaa,news.software.nntp
CC: jgaa@jgaa.com
In-Reply-To: <8761wix3r9.fsf@windlord.stanford.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 60
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-9P4aWpoQI24d7QdxFIgnpRhI39mkh2t6ETOdufd+rAF5eHGvPKrl9rc86Sy+CF2fdl0YEAnq4DEEB+9!flxTTw9TkYZKf3yAAIvWZtqypJTeyG5iPF75ldpObX7NS8o=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.3.40
X-Original-Bytes: 3781