🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #65001

Any problems with this design?

#65001
From: Mark Morley
Date: Thu, 24 Apr 2003 17:47
88 lines
5522 bytes
I've been working on a new piece of software that I currently call 
"Grapevine" (subject to change).  I now have a fully functional 
proto-type that is in initial testing by several users, but I'm looking 
for feedback from the NNTP experts on the overall design.

Grapevine is a caching NNTP proxy and aggregator.  That is, it looks and 
acts like a regular NNRP server but behind the scenes it fetches and 
merges active files, XOVER records, and articles from any number of 
upstream servers (I'm currently testing it with 44 servers).

The goal is to make a large number of groups available to my users, with 
excellent completeness, retainment, and speed, while conserving 
bandwidth (for me as well as the upstream servers) and disk space.

If you're at all familiar with NNTPCache then you'll have a good idea of 
what Grapevine does.  But unlike NNTPCache, Grapevine is not restricted 
to a single server for any given newsgroup (although it can be if that's 
what you want).

Here's an overview of how it works:

First of all there's a process that runs once every day or so.  It 
connects to each upstream server, fetches the active files, and then 
merges them all into a local active file.  Each server can have its own 
set of filters to restrict which groups you'll accept from it.

A second process runs every 20 minutes or so and fetches XOVER records 
for any active groups (ie: groups that users actually read) from every 
server that carries the group in question.  These are merged and given a 
new local article number.  This same process also expires old XOVER 
records, which is quite fast (it uses a MySQL backend to store everything).

The first time a client requests a group, it will appear to be empty, 
but this timestamps the group and it will be filled in (XOVER) within 20 
minutes or so.  As long as clients continue to access the group it will 
remain up to date.  If clients stop reading the group for a period of 
time (configurable of course), it will eventually stop fetching it.

A third process handles client requests and is the actual NNRP server. 
It deals with articles in terms of the local article numbers, so the 
article list you get may represent the contents of any number of 
servers.  When you request an article, it first tries to fetch it from 
the local cache (and articles may optionally be compressed to save 
space), then from the server that originally provided the XOVER data for 
it (and due to a per-server minimum time between XOVER downloads, this 
winds up distributing the article downloads across different servers, 
which can lessen the bandwidth to any one particular server).  If that 
fails, it tries to fetch it from each server that carries the group (in 
a configurable server priority order).  So article completion is very 
good (assuming you have many servers that you can access).

When you post, the article is queued rather than injected immediately, 
which makes it appear extremely fast to end users.  Various tests are 
performed immediately of course (required headers, too many newsgroups, 
etc.) but the actual posting is handled by yet another process that 
scans the article queue every 5 minutes or so.  Articles are posted to 
each server that carries one or more of the groups in question.

Question: what dangers, if any, are there in posting in parallel to 
multiple servers?  My tests so far indicate that no duplicates are 
generated, even when an article is posted to a dozen or more separate 
servers at the same time.  I'm guessing this should be fine as long as 
none of the upstreams change the message ID (which would mean they are 
broken).

The NNRP server doesn't handle ALL the possible commands, but so far I 
haven't found a client that doesn't work fine with it.  I've personally 
tested Xnews, Netscape, Outlook, and TIN, and other users have reported 
success with various other products.

Another process runs nightly to expire cached articles (XOVER data is 
expired separately via the second process explained above).

Currently connections to servers are opened as needed, but processes are 
ordered in such a way as to minimize this.  I'm currently working on an 
optional module that will act as a sort of "socket cache", to further 
minimize the number of connects/disconnects, which will save even more 
bandwidth and speed things up a little bit more.

I'm also working on an optional NoCeM module.

Any thoughts or comments on this overall design?  Feature suggestions? 
And is there any interest in software like this or is it just me?

Mark


Technical Details
Message-ID: <3EA8231F.4090002@islandnet.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!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <3EA8231F.4090002@islandnet.com>
Subject: Any problems with this design?
Date: Thu, 24 Apr 2003 10:47:11 -0700
From: Mark Morley <mark@islandnet.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!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.nntp
Organization: Islandnet.com
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Cache: Grapevine v1.0
X-Complaints-To: abuse@supernews.com
Lines: 87