🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38242

Re: Submitting to Freenix

#38242
From: Russ Allbery
Date: Thu, 24 Jun 1999 00:00
60 lines
3456 bytes
T William Wells <bill@twwells.com> writes:
> Russ Allbery  <rra@stanford.edu> wrote:
>> T William Wells <bill@twwells.com> writes:

>>> Or even better, give up the idea of a monolithic innd. Instead, have a
>>> collection of daemons, each devoted to a particular part of the
>>> "job". Incoming connections would get their own nntpd, which would
>>> talk to historyd, actived, and newsfeedd (for outgoing).

>> That's threads, except hellishly slower.

> I don't think it'd be that much slower. Most of the "action" would still
> take place within each process (or thread).

Except you're going to have to context-switch constantly, which is
expensive and is definitely going to add to your latency.  And the IPC
will be even worse.  I'm willing to bet that INN as it is currently
written will have a better latency than such a scheme.

Diablo already does something like this; I believe Matt's said in the past
that he doesn't really care about getting the last bit of latency and that
his process model isn't really designed for it.

INN currently works fairly well as it stands; if I didn't care about
getting the last bit of latency (mostly just because I think it would be
an interesting challenge), I'd leave the architecture alone.  It's
fundamentally sound.

> "Portable" is my requirement. I'd have no objection to a system that can
> be implemented as either threads or processes but I'd really object to
> one that relied on threads.

By the time anyone finishes a rework of INN to use either processes or
threads, threads are going to be pretty much as portable as other stuff
that INN already relies on (like mmap), possibly more so.  There are
already POSIX pthreads implementations on all nine Unix platforms we
support here at Stanford.

> Be that as it may, a good design would abstract out the shared data and
> the multi-processing stuff, so it could be implemented on a variety of
> platforms.

That's a good ideal.  There are some edge cases that are going to be
tricky.  Doing an orderly shutdown of the entire system, for one.

In any event, adding threading to INN is something that I do intend to
work on over the next couple of years, provided it remains interesting to
me.  Even for people who aren't interested in threads, some nice stuff
should fall out of that work; for one thing, it would necessitate making
INN's internal APIs as thread-safe as possible and abstracting out more
code into libraries so that I don't have to rewrite all the parts of INN
that currently would work fine with threads.

But there are other things to work on first.  :)  Right now, I'm thinking
we may be able to retire subst completely by INN 2.3.

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

Technical Details
Message-ID: <yl3dzg28yw.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: <7g24e7$ckh$1@info.cs.uofs.edu> <ylemj3axr0.fsf@windlord.stanford.edu> <7kr34g$4g5$1@twwells.com> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com>

Show Full Headers
Complete Article Headers
Message-ID: <yl3dzg28yw.fsf@windlord.stanford.edu>
Subject: Re: Submitting to Freenix
Date: Thu, 24 Jun 1999 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <7g24e7$ckh$1@info.cs.uofs.edu> <ylemj3axr0.fsf@windlord.stanford.edu> <7kr34g$4g5$1@twwells.com> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$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: 493645490
Organization: The Eyrie
Newsgroups: news.software.nntp