🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #63666

Re: Client Question - Best Practice

#63666
From: Curt Welch
Date: Mon, 27 Jan 2003 05:32
121 lines
6364 bytes
archiver@i3w.com (Juergen Helbing) wrote:
> A host which accepts cancels is removing articles permanently.
> But removing them also from the XOVER list seems to be
> a hard job for high volume systems.

It might be hard for some servers which have a "broken" xover design, but
my server has no problem keeping xover in sync with reality.  It's not hard
when the server was designed to do it correctly from the start.

> >This is really the nutshell. What is the current low water mark on the
> >server?

No, that's not it.  Articles have _never_ been removed only for the low
water mark.  The low water mark only tells you the lowest article number
still on the server.  When Usenet was younger, most servers supported the
Expires: header which allowed articles to hang around longer than the
others in the group.  And most supported cancels as well.  Large article
number gaps in the newsgroup are normal.  Your newsreader needs to deal
with it.

Almost every server on the planet has "gaps" in their newsgroups.  You
probably just never noticed it because most gaps are small and tend to be
at the end (as articles expire slightly out of order based on what spools
they are in).  It was not until you ran into this case of huge gap that you
saw how much of an issue it can be.

> >From what I hear you saying, it sounds like only sampling the server
> >will let you know for sure.
>
> Yes.

Well, sure.  You have to ask the server to find the answer. :)

> I am not sure, but perhaps the STAT command is the most efficient
> way (for the host) to tell you whether an article is available.

STAT is good (probably the best answer other than ARTICLE) for answering
the question about a single article, but it would suck if you tried to use
it for a large set of articles.

LISTGROUP is the most effecent way on my server to find out what articles
are still on the server and which have been expired or canceled.  But the
command takes no range argument so it forces you to dump the entire group.
I don't know of anyone that uses the LISTGROUP command because of this.  If
it took a range argument, it might be useful in answering the question you
talk about.

> >Maybe I'll throw in a fast XHDR on message-ID and see what the server
> >reports as still available...
>
> AFAIK most hosts are generating the XHDR results from the XOVER list.
> So it might contain the same things.

XOVER is not broken on all servers.  I don't know how broken it is in
general.  His problem isn't that XOVER was broken, but that large number of
articles were expired without changing the low-water mark.  XHDR Message-Id
is probably a good way to check for that on most servers.  But it's
something that will be a waste of time on most servers so you will either
need to make it an option that most users will never understand, or make it
automatic when some other system you use (like a few stat commands) shows
that there are a large number of gaps in the group.

Most of these "problem gaps" will happen with the oldest articls in the
group.  So maybe, one way to do this is to simply use XHDR Message-ID on
the last 100 articles in the group.  If you find gaps, then you can use
more XHDR commands to check more aticles (N at a time) until you find no
more missing articles.

Actually, on Highwind servers which do not support XHDR for headers other
than the ones in XOVER, it might in fact return a valid list of articles in
the group and correctly show you which ones are there and which are
missing.  You might actually try that (i.e. doing an XHDR on a non-standard
header).

Yeah a quick check on easynews shows this:

xhdr asdf 128871-128890
221 asdf fields follow
128871 (none)
128872 (none)
128873 (none)
128875 (none)
128876 (none)
128877 (none)
128878 (none)
128883 (none)
128884 (none)
128885 (none)
128886 (none)
128887 (none)
128888 (none)
128889 (none)
128890 (none)
..

So it returns the clasic highwind "(none)" crap, but it's also correctly
giving you a list of all the articles in the range which are still on the
server.

This won't work on other servers becase a "correct" implementation of XHDR
will only list the articles which contain the header asked for.  But it
might be a neat trick for highwind servers if you care to try and take
advantage of it.  It would be easy for your newsreader to automatcially
test the server doing a command like the above to figure out if the server
works like the highwind server does.

LISTGROUP is probably the best if the group is small enough that you can
justify dumping the article numbers for the entire group, but for larger
groups, XHDR Message-ID is probably going to be the best general answer,
and for highwind servers, the "XHDR fake-header-name" trick might be a good
answer (there are a lot of highwind servers in the world).

> Writing a good download client is a permanent balance between
> unreliability, bandwidth and host-workload.

And the amount of "smart" code you are willing to write. :)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20030127003207.754$B0@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-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <Xns930BDD1C39402peonsomecompanycomin@127.0.0.1> <12439.n13207@archiver.winews.net> <Xns930CEF87A9333peonsomecompanycomin@127.0.0.1> <20458.o1320g@archiver.winews.net>

Show Full Headers
Complete Article Headers
Message-ID: <20030127003207.754$B0@newsreader.com>
Subject: Re: Client Question - Best Practice
Date: Mon, 27 Jan 2003 05:32:07 +0000
From: curt@kcwc.com (Curt Welch)
References: <Xns930BDD1C39402peonsomecompanycomin@127.0.0.1> <12439.n13207@archiver.winews.net> <Xns930CEF87A9333peonsomecompanycomin@127.0.0.1> <20458.o1320g@archiver.winews.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com l@V,1,CCLlC,W+CHwo1kz58LHXtCQ+ZPXO5DCFC2UrM.9s
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-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 120