Thread View: news.software.nntp
6 messages
6 total messages
Started by Andrew Gierth
Sun, 14 Dec 1997 00:00
New approach for NoCeM-on-spool history updates?
Author: Andrew Gierth
Date: Sun, 14 Dec 1997 00:00
Date: Sun, 14 Dec 1997 00:00
33 lines
1962 bytes
1962 bytes
This was a kind of wild idea I had.... ncmspool uses the INN control channel to update the history and do cancels, which is known to have a few problems. c-nocem requires that you pause the server. I think I've found an approach which, while it requires an addition to innd, might well work better than either of the above. The idea goes something like this. Define a new control message type and add code to INN to handle it. It's processed only if it arrives from localhost or the Unix-domain socket (various additional safeguards are needed here, which I'm still thinking about). The body of such a message is treated as a list of message-ids, each of which is added to history (if not present) or looked up (*not* cancelled). The article body is rewritten (yucky, but I couldn't think of a better way) to include the article paths. (You would arrange for the article to be propagated to a channel feed to actually do the deletions, to avoid tying up the main loop.) I've implemented this (except for the security checks) and it seems to work in principle. Questions: - is this an incredibly stupid idea? - has someone done this already? - is anyone interested? -- Andrew.
Re: New approach for NoCeM-on-spool history updates?
Author: Joe Greco
Date: Sun, 14 Dec 1997 00:00
Date: Sun, 14 Dec 1997 00:00
58 lines
2987 bytes
2987 bytes
In news.software.nntp article <87g1nwml64.fsf@erlenstar.demon.co.uk>, Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: :This was a kind of wild idea I had.... : :ncmspool uses the INN control channel to update the history and do :cancels, which is known to have a few problems. c-nocem requires that :you pause the server. I think I've found an approach which, while it :requires an addition to innd, might well work better than either of :the above. : :The idea goes something like this. Define a new control message type :and add code to INN to handle it. It's processed only if it arrives :from localhost or the Unix-domain socket (various additional :safeguards are needed here, which I'm still thinking about). The body :of such a message is treated as a list of message-ids, each of which :is added to history (if not present) or looked up (*not* cancelled). :The article body is rewritten (yucky, but I couldn't think of a better :way) to include the article paths. (You would arrange for the article :to be propagated to a channel feed to actually do the deletions, to :avoid tying up the main loop.) : :I've implemented this (except for the security checks) and it seems to :work in principle. : :Questions: : : - is this an incredibly stupid idea? : - has someone done this already? : - is anyone interested? I guess I'm unclear on what the purpose of the complexity is. A NoCeM process needs to read the list of Message-ID's, try to add each one to history (perhaps along with <cancel.$*>), and if the addition fails due to collision, use the just-accessed data to remove the already existing file. Ideally, the only part that INN should have to do is the history addition/lookup part. Define a new INN control command, something akin to "addhist", which returns "Ok" or "/path/to/articles". Or, if you want to be more clever, extend the streaming NNTP protocol extensions to do this in an asynchronous manner. JUNKTHIS <luser.article.1@host.domain.com> 235 Ok or 435 /path/to/articles Using an actual article, however, is probably more pain than it is worth, and trying to set up channel feeds, etc., to deal with it is just a train wreck that is already happening. ... JG
Re: New approach for NoCeM-on-spool history updates?
Author: Brian W. Antoine
Date: Mon, 15 Dec 1997 00:00
Date: Mon, 15 Dec 1997 00:00
31 lines
2135 bytes
2135 bytes
Joe Greco (jgreco@ns.sol.net) wrote: : In news.software.nntp article <87g1nwml64.fsf@erlenstar.demon.co.uk>, Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: : :This was a kind of wild idea I had.... : : : :ncmspool uses the INN control channel to update the history and do : :cancels, which is known to have a few problems. c-nocem requires that : :you pause the server. I think I've found an approach which, while it : :requires an addition to innd, might well work better than either of : :the above. : : : :The idea goes something like this. Define a new control message type : :and add code to INN to handle it. It's processed only if it arrives You are still going to be running into that cute piece of code in INN that penalizes you for having an active control channel. Every single time the main loop wakes up to process a select() completion, if one of the completions was for a control channel it munges the count so that you only process 3 other completions that cycle. The original version of my cancelchan program used control messages to do the article removal. When I added a couple of feeds to my server and ended up with > 3 open feeds at any given time, that code kicked in and nailed performance on the feeds. -- Brian W. Antoine Engineer and News Admin @ briana@olsy-na.com -OR- Olsy North America briana@tau-ceti.dogear.com Spokane, WA USA
Re: New approach for NoCeM-on-spool history updates?
Author: Andrew Gierth
Date: Mon, 15 Dec 1997 00:00
Date: Mon, 15 Dec 1997 00:00
17 lines
1457 bytes
1457 bytes
>>>>> "Brian" == Brian W Antoine <briana@velar.olsy-na.com> writes: Brian> You are still going to be running into that cute piece of Brian> code in INN that penalizes you for having an active control Brian> channel. Every single time the main loop wakes up to process Brian> a select() completion, if one of the completions was for a Brian> control channel it munges the count so that you only process 3 Brian> other completions that cycle. I was talking about feeding an actual *article* in via a local feed. That doesn't seem to have the same problem. -- Andrew.
Re: New approach for NoCeM-on-spool history updates?
Author: Andrew Gierth
Date: Mon, 15 Dec 1997 00:00
Date: Mon, 15 Dec 1997 00:00
31 lines
1488 bytes
1488 bytes
>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes: Joe> 235 Ok Joe> or Joe> 435 /path/to/articles AG> What do you do when the list of article paths is too long for an AG> NNTP response? Scratch that comment. A reread of the RFC suggests that the limit only applies to commands, not responses. Furthermore, XPATH already does exactly this. Maybe I'll try it again this way and see how it works out. I'd be inclined to return responses like 235 <message@id> or 435 <message@id> article/paths... to make handling of streaming a bit easier, though. -- Andrew.
Re: New approach for NoCeM-on-spool history updates?
Author: Andrew Gierth
Date: Mon, 15 Dec 1997 00:00
Date: Mon, 15 Dec 1997 00:00
101 lines
4557 bytes
4557 bytes
>>>>> "Joe" == Joe Greco <jgreco@ns.sol.net> writes:
Joe> I guess I'm unclear on what the purpose of the complexity is.
What complexity?
My approach to patching INN (or anything else that I didn't write) is
usually to keep changes minimal, and as non-intrusive as possible. In
particular, using an article rather than new NNTP commands or the
control channel simplifies the possible interactions with pausing or
throttling the server. (It also requires considerably fewer changes,
amounting to 3 new lines of code in an existing function and one new
function of <80 lines.)
Joe> A NoCeM process needs to read the list of Message-ID's, try to add
Joe> each one to history (perhaps along with <cancel.$*>), and if the
Joe> addition fails due to collision, use the just-accessed data to
Joe> remove the already existing file.
Joe> Ideally, the only part that INN should have to do is the history
Joe> addition/lookup part.
Exactly.
Joe> Define a new INN control command, something
Joe> akin to "addhist", which returns "Ok" or "/path/to/articles".
Joe> Or, if you want to be more clever, extend the streaming NNTP
Joe> protocol extensions to do this in an asynchronous manner.
Joe> JUNKTHIS <luser.article.1@host.domain.com>
Joe> 235 Ok
Joe> or
Joe> 435 /path/to/articles
What do you do when the list of article paths is too long for an NNTP
response?
Joe> Using an actual article, however, is probably more pain than it
Joe> is worth, and trying to set up channel feeds, etc., to deal with
Joe> it is just a train wreck that is already happening.
Well, having implemented it, it seems to me to be considerably less
pain. Here's how I currently have it set up:
nocemchan\
:!*,news.lists.filters,news.admin.net-abuse.bulletins\
:Ap,Tc,WO:/usr/news/bin/nocemchan
xcancel:!*/local:Adp,G1,Tc,Wn:/usr/news/bin/xcancelchan
(note that I have MERGE_TO_GROUPS DO, and no to.xcancel group in
active; the fact that no groups are fed to xcancel is deliberate.
nocemchan reads the whole overview as being the simplest way to
exclude followups and non-NoCeMs before invoking PGP on the article;
the traffic in nana.bulletins is mostly non-NoCeM these days.)
The nocemchan program (which is only a skeleton at this stage; it
functions, but doesn't yet handle minor details like configuration
files or error handling) takes the NoCeM articles, verifies them and
extracts the message-ids, and produces an article in this form:
Path: xcancel
From: xcancel
Subject: xcancel from <nocem-notice-id>
Control: cmsg xaddhist erlenstar.demon.co.uk
Date: (whatever)
Message-ID: (generated)
Newsgroups: to.xcancel
<luser-1-message-id@spamming.site>
<luser-2-message-id@spamming.site>
<luser-3-message-id@spamming.site>
etc.
It then dumps this into innd, which rewrites the article body to look
like this:
ADDED <luser-1-message-id@spamming.site>
FOUND <luser-2-message-id@spamming.site> news/software/nntp/1234
FOUNDNOFILES <luser-3-message-id@spamming.site>
Since neither the message-ids nor the filenames can contain spaces or
newlines, this can be read and parsed by a trivial program
(xcancelchan) to actually perform the unlinks (either directly, via
fastrm, or whatever method takes your fancy). (Any lines in the
original that don't contain valid message-ids are output with 'INVALID '
prefixed.)
Notice that since to.xcancel isn't a group, the xaddhist article will
not be propagated anywhere except to xcancelchan (not even via
control* feeds). Also, any cmsg xaddhist received from an external
feed or carrying the wrong sitename is cancelled rather than processed.
--
Andrew.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads