🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40480

Re: INN maxed? Time to add a Diablo router?

#40480
From: Russ Allbery
Date: Mon, 04 Oct 1999 00:00
39 lines
2748 bytes
Brad Knowles <brad@shub-internet.org> writes:
> Russ Allbery <rra@stanford.edu> wrote:

>> I don't think you want to get there from that direction.  Like Joe was
>> saying in this group earlier, Diablo's multi-process model with shared
>> memory is actually closer to a threaded server already than INN's is.

> Hmm.  I was thinking that I could get there in several steps -- forking
> to monolithic select, add INN-style filter interface, then go to
> threaded.

Forking is more like threading.  At the beginning of the life of a
threaded server, you spin off some threads, and then you spin off more
threads for incoming connections and the like.  The main difference is the
mechanism whereby threads are spun off and the mechanism for handling
shared data (do you explicitly mark things as shared, or explicitly mark
things as private).

> And going directly to threaded would allow an INN-style filter
> interface?

Sure, if you design it to do so.  The key requirement for an INN-style
filter is for the filter to run inside the same process as the process
accepting articles from the network so that it can pass articles to the
filter without doing a copy.  A threaded server can easily do that.

One thing to bear in mind, though, is that your filter probably isn't
going to play nicely with threads, so you'll want to single-thread it.
Perl's threading support really isn't up to the task; Python's may be, but
the amount of locking may still be pretty heavy and hurt performance.
Probably better to instantiate a single copy of the filter in one thread
and pass all incoming articles through it.  Network and disk are still
your bottlenecks and will benefit the most from concurrency, so that
shouldn't hurt your performance that badly.

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

Technical Details
Message-ID: <yln1tzgrv2.fsf@windlord.stanford.edu>
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: <foo-0210991412200001@192.168.2.3> <yl3dvtp0xb.fsf@windlord.stanford.edu> <foo-0210992103530001@192.168.2.3> <yl3dvtnjuv.fsf@windlord.stanford.edu> <brad-0310991300490001@dialup995.brussels2.skynet.be> <ylvh8olmsi.fsf@windlord.stanford.edu> <brad-0410991314520001@brad.techos.skynet.be> <ylvh8ni9vm.fsf@windlord.stanford.edu> <brad-0410991505000001@brad.techos.skynet.be>

Show Full Headers
Complete Article Headers
Message-ID: <yln1tzgrv2.fsf@windlord.stanford.edu>
Subject: Re: INN maxed? Time to add a Diablo router?
Date: Mon, 04 Oct 1999 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <foo-0210991412200001@192.168.2.3> <yl3dvtp0xb.fsf@windlord.stanford.edu> <foo-0210992103530001@192.168.2.3> <yl3dvtnjuv.fsf@windlord.stanford.edu> <brad-0310991300490001@dialup995.brussels2.skynet.be> <ylvh8olmsi.fsf@windlord.stanford.edu> <brad-0410991314520001@brad.techos.skynet.be> <ylvh8ni9vm.fsf@windlord.stanford.edu> <brad-0410991505000001@brad.techos.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: 532648030
Organization: The Eyrie
Newsgroups: news.software.nntp