🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #65567

Re: Which is faster: retrieve article by article number, or by Msg-ID?

#65567
From: Juergen Helbing
Date: Fri, 30 May 2003 06:40
102 lines
4425 bytes
Bas Ruiter <lordsnow@home.nl> wrote:

>I'm just curious as to which is faster: retrieving an article by it's
>article number, or retreiving an article by Msg-ID.

From my own experience:
Retrieving by article number is faster as long as you are in the
same group. While downloading many articles mixed from a
"download queue" it is slower because it requires always 
a "group" command - and a memory which group you are
currently in.


Retrieval by MsgId has also the problem that some servers
are sending the WRONG article - especially if the article is "older".
This seems to be a 'race-and-hazard' problem because a retry
often (not always) works.

Whenever you are retrieving by msgid then it is necessary to 
validate the incoming message.
This applies also to the retrieval by article number. It is 
ALWAYS necessary to verify whether the incoming article 
is the one you wanted. For this you always need to maintain
the article number together with the msg-id - even if you 
are retrieving by article number.
This is especially funny for crossposts :-)

Tip: Never use 'head' and 'body' commands. Just 'article'.

For multihost downloaders it is a good idea to offer both methods
(article-no or msgid). It is a PITA to fetch headers from all available
servers just to have the article number available.

I'm meanwhile running hosts in some different modes:
* Fetch all headers 
* Fetch just article-nr + msgid (XHDR - works perfectly)

* Dont fetch headers, just articles by msgid
* Dont fetch articles, just headers (or xhdr)
* Fetch headers and articles.

(I'm doing also extensive completeness checks here ;-)


I am myself using exclusively download by MsgId.
An average MyNews owner has access to 20-50 hosts.
So maintaining a full list of article numbers + group-id
for all articles (and all xposts) is far too much diskspace.

btw.: Expiring by "no longer available on host" is unsolvable
for multihost downloaders.


>Intended use is a download tool, a la NewsBin etc. So I imagine that by
>using article numbers you would get better localisation? I therefor
>imagine that pulling articles by article number is faster.

Single host tool: Use article numbers.
Multi host tool: Use both.



Concerning your other question "sorting of headers"...
(I did ask a similar question some weeks ago):

I am having meanwhile _constantly_ 200.000-400.000
headers 'active' in the group ab.sounds.mp3

But I'm using now the approach that 'older' headers 
(read headers) are no longer visible to reach realistic
sorting and display speed. 
I did reduce the sorting job to the 'really necessary' part.
Now I'm having 30.000-50.000 headers (instead of the
full bunch).


It is possible to leave 'incomplete' multiparts longer visible
(until they are complete).

I'm still using 'heapsort'.... But Quicksort might be even faster
- especially if you are keeping the list presorted all the time.
Quicksort is unbeatable for presorted lists. 
But It is as bad as maxsort (n^2) for reverse sorted lists !!!!
Heapsort is unbeatable for random lists and constant sorting time.


An offer:   If you want to write a binary retriever from scratch just
because you dont like the front-end (or lack of features) of 
the available tools:
If you want to use Windows, then you can get a copy of
the MyNews source files and modify them to your needs.
(Borland C 4.52 or 5.0 - normal C, no C++ used.)
It would be unbeatable for features
and has been written during the last 5 years.
However its user-interface is really crazy.


Have Fun !
-- 
Juergen

Technical Details
Message-ID: <59408.u53201@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!newsfeed.berkeley.edu!ucberkeley!newsfeed!wn13feed!wn12feed!worldnet.att.net!207.14.113.17!news.alt.net!usenet
References: <npf9dvsun1hdqbplg77evm6hsmd9nusdrf@4ax.com>

Show Full Headers
Complete Article Headers
Message-ID: <59408.u53201@archiver.winews.net>
Subject: Re: Which is faster: retrieve article by article number, or by Msg-ID?
Date: Fri, 30 May 2003 06:40:59 +0000
From: archiver@i3w.com (Juergen Helbing)
References: <npf9dvsun1hdqbplg77evm6hsmd9nusdrf@4ax.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!newsfeed.berkeley.edu!ucberkeley!newsfeed!wn13feed!wn12feed!worldnet.att.net!207.14.113.17!news.alt.net!usenet
Newsgroups: news.software.nntp
Organization: Altopia Corp. - Usenet Access - www.altopia.com
Lines: 101
X-Newsreader: MyNews