🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40191

Re: Diablo vs. INN questions...

#40191
From: Joe Greco
Date: Tue, 28 Sep 1999 00:00
63 lines
4083 bytes
In news.software.nntp article <7soniq$n3f$1@wave.pipex.net>, Russell Vincent <russellv-n@nosp.uk.uu.net> wrote:
:Brad Knowles <brad@shub-internet.org> wrote:
:
:>     For Diablo:
:
:>         2.  When executing the perl filter, a copy of the program is
:> typically kept running (a la apache w/ mod_perl), but the article has to
:> be fed in on stdin (i.e., copied), instead of a pointer to the appropriate
:> shared memory area being passed.
:
:No, the perl filter reads the article from disk (or more likely
:the buffer cache/mmap'ed version of the file)  as it was only just
:written to disk. The filter is fed the article location and size.

There's no perl filter.  There's just an external filter module.

Now for the correct description, since the filter doesn't operate in the
manner you describe...  :-/

Diablo offered a bit of a challenge for filtering, since it does
forking per-process reception of articles and didn't really offer a central
point where one could put the filter into the inbound feed.

Diablo's operation involves doing history lookups and article acceptance in
its subprocesses, and then communicating that data back to the master
process, which mainly accepts new connections and handles the batch files.

So I punted (a bit)...  I modified the master process.  It takes the just-
received article, retrieves it from disk (since the child - not the master -
had a copy), and feeds it to the filter.  Based on the return from the
filter, the article may or may not be fed to sites.  But it will still be
on spool.

One likely optimization would be to notify the child process to remove the
just-received article in the event that the article was filtered and no
feed object received a copy of the article ("onlyspam" option).  I didn't
actually do this, although somebody probably should.  It would also require
some minor consideration about the case where someone was using the Diablo
server as a pure spool server.  I can't think of any case where someone
would have no outbound feeds, AND run a filter, AND still want to retain
the article even if the filter rejected it.  I mean, what'd the point of a
filter be then.  But maybe someone else can think of a reason.

Another likely optimization would be to spawn the filter logic off into
a subprocess, and have the diablo children deal with it in some more
direct manner.  This would potentially allow for things like the use of
shared memory to pass the article from diablo child to diablo filter,
would remove a significant bottleneck in the main diablo process, and
would probably only require minor modifications to the main/child diablo
communications channel to pass the filter-return-status.

More along the lines of latency optimizations, it'd be interesting to
extend the diablo feed mechanism into something more INN-ish.  Again,
this could be done by spinning off an outbound-feed process, which the
diablo children would talk to directly, instead of the parent.  Give it
the ability to do INN-style funnel feeds, program feeds, pipe feeds,
etc.  I've never been a huge fan of the /news/dqueue thing, although it
works great for some purposes.  It sucks for "rtflush" feeding to fifty
peer objects in a directory with a thousand entries.

... JG

Technical Details
Message-ID: <37f05ee5$0$7747@news.execpc.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: <brad-2709991944100001@brad.techos.skynet.be> <7soniq$n3f$1@wave.pipex.net>

Show Full Headers
Complete Article Headers
Message-ID: <37f05ee5$0$7747@news.execpc.com>
Subject: Re: Diablo vs. INN questions...
Date: Tue, 28 Sep 1999 00:00:00 +0000
From: jgreco@ns.sol.net (Joe Greco)
References: <brad-2709991944100001@brad.techos.skynet.be> <7soniq$n3f$1@wave.pipex.net>
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: 530188256
Sender: jgreco@earth.execpc.com
X-Trace: S=T[4Gb?NPAI5[332>a9YKbfNiaEHUgJGRYcgIRLSUEMY:KdV33<jPOeL1D0:PO0HF21Vkhja922Fl=jlCRBl;3C4dTgmFn@ShG
Organization: sol.net Network Services - Milwaukee, WI
Newsgroups: news.software.nntp
X-Complaints-To: abuse@execpc.com