🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #61400

Re: Did someone's peering break?

#61400
From: Sven Paulus
Date: Sun, 13 Oct 2002 10:28
107 lines
6482 bytes
Curt Welch <curt@kcwc.com> wrote:
> A bit odd but it could work.  I'd still leave bytes on the line after
> the message-id because it would waste less bytes that way and I

Hm, I think it's much more common rejecting articles due to missing
newsgroups than due to size limits. I don't like to use size limits to
distinguish between binary articles and text articles for obvious reasons.

>> ... should be possible. If each block could be written with writev() it
>> is almost as efficient like sending everything on a single line.
> You don't need to use writev().
> write("XCHECK <mid>\r\nNewsgroups: x.y.z\r\nBytes: 3113\r\n.\r\n")
> is the same as:
> write("XCHECK <mid>  Newsgroups:x.y.z  Bytes:3113\r\n")

Ok, given that you already have the contents in of the headers in zero
terminated buffers. But you are right, usually the articles only get opened
when the CHECK has succeeded, so we don't have to deal with pointers into
the original article buffer for getting the header lines.

> Or you could just screw the NNTP line length limit and require any server
> that supports XCHECK to also support a longer command line.

But this might lead to major changes in some servers. Doing it with data
lines only uses the mechanisms which are already there.

> Or you could do something much more general, powerful, and clean:
> < XCHECK <message-id>
> > 244 <message-id> bytes newsgroups
> < TAKEHEAD <message-id>
> < Bytes: 873434
> < Newsgroups: whatever.you.want,which.goes.on.forever
> < .
> > 238 <message-id>

But this would add a whole round-trip more to each article offered (waiting
for the 244 after XCHECK to send the TAKEHEAD command). That's exactly what
you want to avoid when using streaming mode. But if you are going to send
TAKEHEAD without waiting for the reply to TAKEHEAD, then you can add the
header lines directly to the XCHECK command, there is no need splitting the
negotiation in two commands.

> So servers that can support this use XHCECK instead of CHECK as a way
> of telling the receiving side of the feed it can use this new feature.

But transmitting the names of the headers which the receiving side is
evaluating must only be done once after establishing the connection (as a
reply to LIST EXTENSIONS or MODE XSTREAM or whatever). There is no need
sending it every time, because it won't vary from article to article.

[ TCP connect ]
< 200 welcome
> MODE XSTREAM
< 204 bytes newsgroups
> XCHECK <message-id>
> Newsgroups: binary.usenet.hell,even.more.garbage
> Size: 532131
> .
< 438 <message-id> Unwanted newsgroups.

> The receiving side can send the normal response code to the XCHECK, to
> accept the full article or reject it, but there would be a new code (I made
> up 244 above) which is a way the receiving side could ask for more
> information.  It would send keywords for the headers it wants to see for
> the article and the sending side would respond with a TAKEHEAD command
> which only included the data asked for.

I think the additional round trip hurts much more than the additional maybe
100-150 byte per article to be transferred.

> I guess the receiving side could even respond to the TAKEHEAD with yet
> another request for more header information.  But the normal would be to
> respond with a normal check code for take or reject or try again later.

Do we really have the need for this? There are two cases:

 1. The receiving side already knows the article by Message-ID
     (already received or rejected it) -> transmitting the additional
    data would be superfluous
 2. The article in not known yet, so we would need the additional
    information to evaluate if the article should get transferred to
    us

Hm, if you have a lot of peers, case 1 clearly dominates. So on further
thinking you might be right with splitting the command. In a perfect world,
the additional round trip is only added once per article (for the first peer
to offer this article). To all other peers the article is rejected after the
XCHECK command. This shouldn't hurt too much.

> The advantage of the above system is that you would only have to ask for
> the header data the first time you saw the message.  When it's offered by
> your other peers, you can just reject it and they never had to waset
> bandwidth sending the extra data.

Yes, you're right. I'm still worried a little bit about the additional round
trip, but this may be only a minor drawback.

> And the receiving side of course gets to pick what headers it wants to look
> at without having to ask their peer to change the configuration.

But the receiving side should cope with the case the peer transmits less
headers than asked for, since usually the sending side has not access to the
whole article when offering it (going into the news spool and accessing the
article itself when doing XCHECK would be a large performance penalty).

Sven
Technical Details
Message-ID: <aobhs0$pbm$1@sapa.inka.de>
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!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!schlund.de!inka.de!not-for-mail
References: <anssll$n3$1@lust.ihug.co.nz> <1034197713.326176@ok-corral.gunslinger.net> <yln0pncnex.fsf@windlord.stanford.edu> <1034200519.445767@ok-corral.gunslinger.net> <ylu1jvb6x5.fsf@windlord.stanford.edu> <00O000000O@news.radio.cz> <ylwuony3qp.fsf@windlord.stanford.edu> <20021012182340.307$tH@newsreader.com> <yl4rbr70km.fsf@windlord.stanford.edu> <aoas5r$jid$1@sapa.inka.de> <slrnaqhtj8.ci3.andrew+nonews@trinity.supernews.net> <aoatm3$jms$1@sapa.inka.de> <20021013020852.845$Fm@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <aobhs0$pbm$1@sapa.inka.de>
Subject: Re: Did someone's peering break?
Date: Sun, 13 Oct 2002 10:28:16 +0000
From: Sven Paulus <sven@karlsruhe.org>
References: <anssll$n3$1@lust.ihug.co.nz> <1034197713.326176@ok-corral.gunslinger.net> <yln0pncnex.fsf@windlord.stanford.edu> <1034200519.445767@ok-corral.gunslinger.net> <ylu1jvb6x5.fsf@windlord.stanford.edu> <00O000000O@news.radio.cz> <ylwuony3qp.fsf@windlord.stanford.edu> <20021012182340.307$tH@newsreader.com> <yl4rbr70km.fsf@windlord.stanford.edu> <aoas5r$jid$1@sapa.inka.de> <slrnaqhtj8.ci3.andrew+nonews@trinity.supernews.net> <aoatm3$jms$1@sapa.inka.de> <20021013020852.845$Fm@newsreader.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!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!schlund.de!inka.de!not-for-mail
Newsgroups: news.software.nntp
Organization: (Posted via) INKA e.V. http://www.inka.de/
Lines: 106
NNTP-Posting-Host: puric.inka.de
X-Trace: sapa.inka.de 1034504896 25974 212.227.14.17 (13 Oct 2002 10:28:16 GMT)
X-Complaints-To: newsmaster@inka.de
NNTP-Posting-Date: 13 Oct 2002 10:28:16 GMT
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.0.39 (i686))