🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #42544

Re: Header-Only feeds

#42544
From: Curt Welch
Date: Wed, 29 Dec 1999 00:00
393 lines
21659 bytes
uhclem.jan00@nemesis.lonestar.org (Frank Durda IV) wrote:
> [17]Frank Durda IV <uhclem.jan00@nemesis.lonestar.org> wrote:

> [18]Curt Welch (curt@kcwc.com) wrote:

Frank, you're quoting technique is interesting, but like some of your
other ideas, I don't think you appreciate the problems it causes
others:

> [18]Another good feature of your algorithm is that it integrates nicely
> with [18]the current feed network.  That is, we don't have to build a
> parallel set [18]of servers which support the "new" system.  With most
> the other techniques [18]we talked about I could only see it working if
> you set up a separate feed [18]network on the side.

> Further, NO new
> server commands are required.  Sure you can add some, but there is no
> point.

Maybe you missed my earlier article on this subject.

You MUST transport them with special commands to keep header-only articles
from leaking into the wild.  A site sending out a flood of body-less
articles into Usenet would be doing more damage to Usenet than a site
sending out cancels for all large articles.  It would be cut off from the
net within minutes by mobs of angry users and sysadmins.

> In the setup I suggest, there is never an article that has no
> body, so no special command is needed to handle this situation.

Usenet has no problem transporting articles without bodies.  So that's
not the issue and not why special commands are needed.

> It
> ALWAYS has the original body, or a "mini body" that says something like:
> "body available at URL:....".  Even if we didn't want to provide this
> functional toe-hold for people using servers that don't know how to get
> the full bodies (the URL pointer), a blank line in the body would still
> be sent to guarantee backward article handling compatibility.

A URL reference alone won't cut it.  There are many people who read news
off-line, so the URL reference would be useless to them.  And more
important, there is a shit-load of client software which finds and
recombines multipart articles and all of that would have to be re-written
to deal with missing bodies.  And some of it, which currently works
off-line, wouldn't be able to work at all.

If this system is going to be used, it must not disrupt the current usenet.
And that means you can not go around transforming articles that don't
belong to you and then pass them out to the rest of the net.  Adding a URL
reference to the body you cut off just isn't enough "backward
compatibility".  You could do that for your own articles if you liked, but
you would lose most your customers if you did that.  Might is well just set
your posting size limit down to 2K.  It would have bascially the same
effect.

The mini-article and URL reference by itself isn't a bad idea and might be
useful.  But the concept of passing those out to the current Usenet is a
very bad idea.

> I recommend only a single added header line to the headers to make
> detection of a mini-body to be determinable just by looking at the
> headers via HEAD and similar handshakes.  It could also be an extension
> to an existing header, but chances are that would break things, so a new
> header line is best.  This extra header line would tell a server that
> that if a reader asks for the body via BODY or ARTICLE commands, it needs
> to go get it from the addresses stipulated in the Path: header.  The Nth
> hop, where the full body is replaced with the mini-body would be
> responsible for adding this extra header line, say
>          "Body-Truncated-at: %s, %d bytes"
> where the first %s is pointing to Hop N, the first place to go when the
> mini body needs to be replaced with the full body.   The %d indicates the
> true size of the full body, as this is needed info on the receiving end.

My thought had been that a 'head-only' article would be spotted by looking
for the Body: header AND an empty body.  But that wouldn't allow for the
mini-body possibility.  And it makes the test more complex when both things
have to be checked.  And makes it imposible to tell if the article is
complete by only looking at the header.

So I like your idea that an article that has had it's body stripped off
(and optionaly replaced with a mini-body) has a unique header added to it.
But the server which stripped the body off might not be acting as a body
server.  The site as a whole might not even be running a body server (say
for example the hp example of a site cut off from the net by firewalls).
So having it record "who did it" I think would be useful. But I don't think
it should be expected to be a host which is acting as a server for the
body.  I'd also prefer the byte count to come first, leave off the "bytes"
string and the comma (just more human readable junk in a header which
should be optimized for a machine to read).  So I'd vote for something more
like this:

Body-Truncated: <bytes> <path-host>

And I'd still vote for a new header to list the body servers instead of
messing up the path header.

Body-Servers: <bodyhost-spec> [...]

> [18]If you were willing to convert your site to one which used the
> header-only [18]system, all you have to do is upgrade your current
> transit server to one [18]which knows about the new technology.  And I'm
> thinking you would probably [18]set up a new server to act as a body
> server to the world as well (but the [18]transit server could try to do
> that).
>
> The transit server is the wrong place for getting full bodies, because
> most transit servers have tiny spools (at least that is the case on the
> "big" servers out there), and so a site would have an article on its main
> article spool days or even weeks after it was no longer available on that
> sites transit servers.  Since most sites add their main server name to
> the Path: in addition to the transit server names (hey - you want a low
> Freenix number, right?), so providing the correct location should not be
> an issue.

Most sites add their main server name to the path?  What Usenet do you live
in? Take a look at a handful of Path: lines and them come back here and say
that again with a straight face.

Most sites simply let their transit server but it's name in the path and
that's it. Large sites (which run multiple transit servers) do tend to
insert an extra generic name (like Sprint, uunet) in there so their peers
can alias out a single name instead of a set of transit server names which
is likely to keep changing.  And that's fine.  And some sites might use
their main host name as that "generic" name, but not most sites.  Looking
at a few paths from my spool I'd say that at most, only 1 out of 10 sites
are putting their "main" server's name into the path.

I would tend to run a separate server as a body server because I don't
want my main server(s) loaded down with requests from outside sites.  If my
body server get's hit hard from outside users, I don't want it to kill the
performance for my paying users.  What I would probably want to do however
is feed head-only versions of articles to my main server for any articles
which I had put into my body server.  That way, the spool of the body
server is only used for those articles which I am acting as a body server
for, and my main spool won't have to waste it's space on those same
articles (after all, I have a good connection to my body server).  That's
also good because that way I'll be using my body server, and if it has
troubles, I'm more likely to do something about it instead of just ignoring
it.

And since the body server only holds articles which were advertised to the
world, the additional feature you talk about below to prevent users from
reading other articles wouldn't be needed (though it's probably needed in
general anyway to allow people to use their main server as the donor server
if they wanted to do it that way).

> In other words, the donor server
> will offer ONLY the articles for which it has agreed to be the donor,

Yes, that's important.

> *   Those of us who run premimum servers have to protect our systems on
>     this point or no one would bother to buy the premimum news service.
>     Whether this provides enough protection against freeloaders is a
>     study left to ponder.

I wonder.  Might this encourage high-bandwidth downloaders to run their
own servers so they don't have to pay a news service a premium for all
the bandwidth they use.  i.e., they end up stealing the bandwidth from
all the donor servers.  And then the net as a whole looses because the
caching effect that would have happened at the news service doens't
happen when you have 100 separate servers each downloading all those
mp3s.

> Along these lines, donor servers should only provide articles requested
> by message-ID, not by group/article number, don't offer headers and none
> of the XHDR/XOVER/NEWNEWS/GROUP/LIST type commands work for strangers.

It seems resonable to me to support HEAD, BODY, and ARTICLE.  If someone
only wants the head you sure don't want to force them to download the
whole thing.  And if they just want the body (which might be typical),
why force them to read the head.

> It might even be prudent to limit the number of BODY/ARTICLE commands per
> connection without authenticating, something that would match the
> behavior of a well-behaved remote server that was responding to random
> requests for articles by contacting various different systems based on
> the Path: data, and so it would not hold the connection to a given server
> open very long.

But on a large busy server, it seems to me that it would tend to open a
connection to a donor server and leave it open for a period of time (say 60
seconds) so in case it was needed again it would be ready to use instead of
having to open new connections for every body. So with that design, a
server may well want to download a large stream of articles for a single
connection.  But I guess it doesn't hurt much if you force a disconnect
after every 10 requests, and that might slow down hackers...

> The Donor server could also limit how many days later a full body can be
> requested to something less than the expiration time on that server.
> This protects the expense some sites have of terrabytes of storage for
> longer retention time for theyr paying customers but still allows them to
> participate in the donor server strategy.  Since a lot of the big posts
> are posted via the premimum servers, their cooperation in this is
> essential if any sort of scheme like this was ever to work.

Doesn't sound like a good idea in general, but it certainly is an option
any Donor would have the right to implement.

I'm kinda thinking something like this scheem might be required to get
Usenet to the next level.  In something like 3 to 4 years, Usenet will pass
100MB/sec and without something like this, there will only be 2 or 3 sites
left that are able to build systems large enough to support that.  Nobody
will want to end up "owning" Usenet and taking responsibility for it's
content -- and that's what will happen if only 3 sites are left.

So sites might welcome this scheem because without out, they won't be able
to stay in the business.

> NNRPD (or similar newsreader servers) have to be modified enough to
> accept BODY <message-ID> (and perhaps ARTICLE <message-ID>) while in a
> 480 state (not yet authenticated) and return the article only if it's own
> name appears in the Path: of that article with a "+".  Example:

Yep.

> Donor server administrators might also limit donor connections to servers
> that have a reverse DNS of two or three segments (eg, foobar.com or
> news.foobar.com), eliminating most direct connections from modem pools
> and other individual client PCs who have no reverse domain names or far
> longer domain names, eg ppp145.clarksdale.foobar.com or
> cf.dd.a1.09.adsl.foobar.com.

Maybe the connections need to be more controlled?  Like only allowing
connections from sites which are also running donor servers.  i.e., if
you want to access other donor servers, you somehow have to prove that
you too are running a donor server.

Not sure how a server would "prove" it was running a donor server.  And
the idea of maintain a current list of valid sites doesn't sound workable.

> [18]You could run the "body-server" as a separate process on
> [18]the same box you use for transit as well of course.
>
> There is no reason to have a separate server or even a separate daemon
> for the donor server function.

Sure there are reasons.  It keeps the outside traffic off your main server.
And if you do like I suggested above, you end up splitting your spool
across two servers -- your donor server and your main server.  Any article
you send to your donor server, you send only the header to the main server.
So you don't end up paying for disk space to store those articles twice.
If the main server software is smart enough, it would treat your local
donor server as special, and _not_ cache articles from it like it would
from all the other donor servers because you would prefer to use it as
the cache instead of copying those articles to the main server.

Not everyone would want to set up there system like that, but there
is a reason why some people would want to do this.

> A less-ideal solution would be to define a global donor server port
> number to separate that traffic from normal local NNTP/NNRP traffic.
> However, in my opinion, it would better to use the traditional port and
> make minor changes to the NNRPD (or equivalent) daemon to know how to be
> a donor and limiting access when in that mode.  If not by permissions,
> perhaps a new command "DONOR" to put it in the mode.   You have to go in
> that code module anyway to teach the daemon how to go to a donor server
> should someone ask for the full body of an article when locally you only
> have the mini body right now.

I think, as was discused before in this thread, that the Body-Server: list
should allow for things like optional port numbers, and usernames/passwords
to be listed with the host (more stuff that doesn't belong in the path).
This gives each of us more options on how to configure our systems to meet
our own needs.  It we want to run the donor server on the same box, but on
a different port, we can do that.  If we want to force the donor to
authenticate with a special ID, we can do that as well.

It might make sense to define a standard default user ID/password scheem
like the anonymous login of ftp.  Maybe that could come into play with the
concept of "proving" you are running a donor server (something like passing
the name of your donor server as the password?).

> On the recipient server who has a request for an article from some news
> reader and finds that all it has locally is a mini-body, what it must do
> to obtain the full body is understood and discussed above and in the
> earlier post.  It must be expected that this server will replace the
> mini-body locally with the full body, remove the special header and store
> that re-assembled article for as long as that article would be kept
> normally had it arrived here complete and intact originally, and deliver
> this to the originally querying newsreader, plus delivering the local
> complete copy to any other readers that request the same article.

Yep.

> For CFS spool systems, you need the ability to free (or skip) the space
> originally used for the header and mini body, and add a new copy of the
> complete article to the spool (BODY AND HEADERS - remember you have to
> zap the line in the headers that says you don't have the complete body -
> now you do).  This means the mini-body strategy is more complex or
> slightly more wasteful at CFS sites.  Traditional spools can simply
> construct and write-out a new article file with no wasted/gas spool
> storage.

You just add the new "full" copy to the end of the CFS like any other new
article which just showed up and then update the indexes so that
corresponding article in each group is updated to point to the new "full"
version of the article instead of the old.  The old space is wasted, but
considering this is only done for large articles to begin with, who really
cares that 1K of space was wasted for that 50K+ article.  I think it's a
very resonable price to pay.

> ... but regardless of method, the
> goal is to not go back to the donor server more than a few times for the
> same article over its retention life.

Right.

> Oh, another benefit of such a scheme:  forging the Path: line becomes a
> thing of the past, unless you don't really want anybody to see your
> article. If you fake donor sites, those sites won't return the articles
> because their name won't appear in the right place in the Path: on the
> copy they have, assuming they got the article at all (in theory they
> should not).  If you add fake non-donor sites, to the Path:, it will be
> even more obvious where the real propagation path starts, where the +
> signs start to appear.   You might as well put out flares...

Notice however that path forging is just as hard even if you don't use
the path to store the list of donor servers.

> [18]That works, but I think using the Path: header isn't the right
> solution for [18]this.  As you say below, it causes complexities with
> aliases, and it also [18]causes problems with systems such as frenix and
> things like that which look [18]at path hosts.
>
> If freenix can't grep out the odd "+" character ...

And deal with optional :<port>, and anything else like that...

It's not just freenix.  It's any software that people have written to
analize Path: lines. I know of various people who have written custom code
which looks at Path: lines to figure out various things about article
flows.  All these guys will have to update their code if we start
redefining the meaning of the Path: line.  There's just little advantage to
do it -- most donor servers won't be listed there to start with so they
have to be inserted as "fake" path hosts which will just cause all this
existing software to break.

> [18]If you mix it in the Path:, then you end up breaking existing systems
> [18]with the new feature (even if only in minor ways).

> Not really.

Yes really.

You will break freenix.  They will have to fix it to make it work again.

You will break Chris Sedore's tfeed: http://tfeed.maxwell.syr.edu:8080/
He will have to fix it to make it work again.

You will break code I have written.  I will have to change it to make
it work again.

> [18]Also, there's the issue of sites wanting to know how large the full
> article [18]is (in bytes) when it's only got the header.  You need it for
> the XOVER [18]data and for testing the size on outging feeds.
>
> See above.  When a server converts the body of a post into a mini-body,
> it adds a header (I suggested "Body-Truncated-at:"),  which provides the
> true article size.  The overview data must reflect the size of the full
> article, even if the system only has the mini-body currently.

Yeah, as I said, I like that concept.

What about the Lines: header and the mini-article concept?  Should Lines:
always tell you the number of lines in the full body?  Or should it tell
you the number of lines in the mini-body?  Maybe we need to add lines
to the Truncate header if we want to support the mini-body concept?

I was assuming it would always reflect the true full-article size but
I didn't think about the mini-body concept.

> Now, because it's so compatible with the existing scheme of things,
> someone with some spare time can come up with a patch in a couple of
> hours, right?  :-) That'll take care of all the INN/NNRPD servers out
> there.  Now we get to wait for all the others to steal the idea and try
> to call it their own...

If we get this to a point that seems to make sense to implement, I'll be
willing to add support for it in my own server (it's a custom server which
only I use).  And I will probably let a few select people have copies of my
server so we could set up a test-bed to try out the concept.  But someone
else would have to add support for it in INN.

But if we get it to the test-bed phase and people like how it's working,
then I think it would be easy to find someone willing to add it to INN.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <19991229030003.356$L4@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!not-for-mail
References: <09B506169F5CCAD5.ADBCDABED18E442A.5B349B33E0C2C1F4@lp.airnews.net> <19991222223519.382$HN@newsreader.com> <497C2C5D1309A679.AAC6286A5981D3B9.CB5C362B8D377A8F@lp.airnews.net>

Show Full Headers
Complete Article Headers
Message-ID: <19991229030003.356$L4@newsreader.com>
Subject: Re: Header-Only feeds
Date: Wed, 29 Dec 1999 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <09B506169F5CCAD5.ADBCDABED18E442A.5B349B33E0C2C1F4@lp.airnews.net> <19991222223519.382$HN@newsreader.com> <497C2C5D1309A679.AAC6286A5981D3B9.CB5C362B8D377A8F@lp.airnews.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: 565964879
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp,news.software.readers