🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
10 messages
10 total messages Started by Simon R Knight Mon, 09 Mar 1998 00:00
Q: XHDR and XOVER
#26708
Author: Simon R Knight
Date: Mon, 09 Mar 1998 00:00
74 lines
4344 bytes
I am trying to learn a little about NNTP, and have written a small
program that enables me to talk to an NNTP port. During my
experimentation, I have observed some behaviour among different news
servers that has raised questions that I have been unable to answer by
studiying the RFC's. Perhaps someone in this newsgroup may be able to
help me with answers to these questions.

The first suprise to me when talking to different news servers, was
that the first and last article numbers returned by a GROUP command,
sometimes encompass a range in the thousands, even though the
estimated number of articles may only be a few hundred ?

Before writing my program, I imagined that it would be possible to
iterated through each of the article numbers in a group, to extract
header information (eg. NNTP-Posting-Host or Path) that isn't provided
by the XOVER command. In my first attemp, my program had to iterate
through thousands of article numbers before reaching the upper end of
the range, which contained the few hundred estimated articles; after
iterating through approx 3 thousand article numbers the process came
to a halt, before reaching the article numbers which were associated
with actual articles. My first question would be; how common is this
disparity ...  is it the norm, or have I just been talking to errant
servers ?

My next experiments were with the NEXT command, where it became
apparent that returned article numbers were not sequential, but
jumping over certain intermediate ranges. I am now wondering if the
article numbers returned with the NEXT command (or XHDR SomeHeader-)
are actually identical to those articles in the NOV database ?

When I iterate through some of the article numbers that a NEXT command
(or XHDR SomeHeader-) will jump over, I am often able to obtain path
lines using the HEAD command. As I am particularly interested in
scanning path lines and NNTP-Posting-Hosts for analysis, these
otherwise bypassed article numbers are significant, and yet it isn't
practical to iterated throught thousands of non-existent article
headers. One way that I thought might be a solution to the above, was
to use the XHDR command with the first article number, followed by a
hyphen, as the command argument, but this command also skips many
article numbers that actually contain path-line information (if
nothing else). My second question is;  is this XHDR command (with the
first article number followed by a hyphen), using the NOV database
also, or is it using some other database that may be unreliable for a
news client to rely on ?

At the moment, I am wondering if I should perform and XOVER- command,
and obtain an overview of all NOV articles, and then specifically
request Path field bodies, and NNTP-Posting-Host field bodies, using
each article's number or message id ?  If the XOVER- command is only
returning the same article numbers as the above XHDR (and NEXT)
command, then I could skip an overview where overview data is not
essential, and simply use these other commands. Uppermost in my mind,
is the reliability of and support for commands like XHDR and XPAT as
opposed to XOVER ?

I haven't yet implemented parsing/unfolding of NOV data, so I haven't
been able to accurately compare this data with the data generated by
the other commands.

What is the future looking like for NNTP server software ?  What
changes might I expect to encounter in during the next few years?

Any suggestions or clarification would be most appreciated.


Thanks !

Simon R Knight

PS. I'm not sure if this is the best newsgroup to pose these
questions; please let me know if there is a more appropriate one.

Re: Q: XHDR and XOVER
#26701
Author: Fluffy
Date: Mon, 09 Mar 1998 00:00
118 lines
6768 bytes
Simon R Knight <srk@bigfoot.com> wrote:
: The first suprise to me when talking to different news servers, was
: that the first and last article numbers returned by a GROUP command,
: sometimes encompass a range in the thousands, even though the
: estimated number of articles may only be a few hundred ?

Sure.  Lots of things can cause this, from active files that simply aren't
updated very often, to FAQs with very long expiration dates, to old articles
that get "stuck" and occasionally need to be manually removed by the admin.

: Before writing my program, I imagined that it would be possible to
: iterated through each of the article numbers in a group, to extract
: header information (eg. NNTP-Posting-Host or Path) that isn't provided
: by the XOVER command. In my first attemp, my program had to iterate
: through thousands of article numbers before reaching the upper end of
: the range, which contained the few hundred estimated articles; after
: iterating through approx 3 thousand article numbers the process came
: to a halt, before reaching the article numbers which were associated
: with actual articles. My first question would be; how common is this
: disparity ...  is it the norm, or have I just been talking to errant
: servers ?

Manually stepping through article numbers is not a very good way to do it. 
The NEXT command will give you better results.  Too, if you keep a history
on file of articles you've already read (like .newsrc in most newsreaders),
you can save a lot of work in many applications.

: My next experiments were with the NEXT command, where it became
: apparent that returned article numbers were not sequential, but
: jumping over certain intermediate ranges. I am now wondering if the
: article numbers returned with the NEXT command (or XHDR SomeHeader-)
: are actually identical to those articles in the NOV database ?

The missing articles may have expired (see the thing about FAQs above), or
been cancelled.  Too, some servers don't fill in every article number but
one here and there for various reasons.

: When I iterate through some of the article numbers that a NEXT command
: (or XHDR SomeHeader-) will jump over, I am often able to obtain path
: lines using the HEAD command.

That's reasonable to see.  The overview (NOV/XOVER) databases are filed
separately from the articles themselves, and it's not unusual to see
no-longer-living articles in there.

: As I am particularly interested in
: scanning path lines and NNTP-Posting-Hosts for analysis, these
: otherwise bypassed article numbers are significant, and yet it isn't
: practical to iterated throught thousands of non-existent article
: headers.

Right.  Also, have you looked into the STAT command?  It can be very useful
for some kinds of searches.

: One way that I thought might be a solution to the above, was
: to use the XHDR command with the first article number, followed by a
: hyphen, as the command argument, but this command also skips many
: article numbers that actually contain path-line information (if
: nothing else). My second question is;  is this XHDR command (with the
: first article number followed by a hyphen), using the NOV database
: also, or is it using some other database that may be unreliable for a
: news client to rely on ?

XHDR can grab lots of things that don't normally exist in overview, so the
usual behavior is to have it grab the information from the article itself. 
However, none of the commands can be guaranteed to use a given source for
hte information they supply, and it's probably not a great idea to design an
assumption like that into your code :/

: At the moment, I am wondering if I should perform and XOVER- command,
: and obtain an overview of all NOV articles, and then specifically
: request Path field bodies, and NNTP-Posting-Host field bodies, using
: each article's number or message id ?

The overview also usually gives you the Xref, which contains the article
numbers.  Fetching by article number is easier on many servers because you
don't have to hit the history file.

: If the XOVER- command is only
: returning the same article numbers as the above XHDR (and NEXT)
: command, then I could skip an overview where overview data is not
: essential, and simply use these other commands. Uppermost in my mind,
: is the reliability of and support for commands like XHDR and XPAT as
: opposed to XOVER ?

I would tend to trust XHDR a wee bit more than XOVER, but XOVER offers such
better performance that I'd be willing to make that concession for most
applications.

: I haven't yet implemented parsing/unfolding of NOV data, so I haven't
: been able to accurately compare this data with the data generated by
: the other commands.

It's usually fine, but being a separate database it *is* possible for it to
get out of synchronization with the real article database.  You will
probably want to check the newest article in the group, and make sure that
HEAD and XOVER match, before deciding whether XOVER is okay to use on the
current group.

: What is the future looking like for NNTP server software ?  What
: changes might I expect to encounter in during the next few years?

Most of the recent NNTP innovations have been going into the conversations
between servers, rather than into the reader interface.  Some marked changes
look to be in store for the layout of the articles themselves, and there is
a pretty good chance that security features will be introduced.  The methods
of storing and serving articles, beneath NNTP, have been seeing some radical
changes, but those shouldn't do much of anything to the reader interface
except to make it speedier.  The new "groupless" storage methods may
facilitate better searching capabilities (perhaps an XPAT that works across
all or a wildcarded set of groups?), which is the only *really* useful
enhancement that comes to mind at the moment.

-- 
"gems - harmless and highly amusing!"  -Gareth Gee, on Meowers

Re: Q: XHDR and XOVER
#26707
Author: Terry Kennedy
Date: Mon, 09 Mar 1998 00:00
89 lines
5335 bytes
Simon R Knight <srk@bigfoot.com> writes:
> The first suprise to me when talking to different news servers, was
> that the first and last article numbers returned by a GROUP command,
> sometimes encompass a range in the thousands, even though the
> estimated number of articles may only be a few hundred ?

  Not all servers implement update the minimum article number on a regular
basis. I have some transfer-only servers where I only update the minimum
article number once a week. [Of course, the maximum article number is up-
dated each time a new article arrives for that group.]

> Before writing my program, I imagined that it would be possible to
> iterated through each of the article numbers in a group, to extract
> header information (eg. NNTP-Posting-Host or Path) that isn't provided
> by the XOVER command.

  Normally, newsreaders keep track of the last article seen in each news-
group and start from there, regardless of what the server says the minimum
article number is. It is generally accepted that articles will always be
added starting at the highest article plus one. Various people have pro-
posed doing otherwise (in particular, "backfilling" some of the empty
slots) and general agreement seems to be that that is a Bad Idea.

> My next experiments were with the NEXT command, where it became
> apparent that returned article numbers were not sequential, but
> jumping over certain intermediate ranges. I am now wondering if the
> article numbers returned with the NEXT command (or XHDR SomeHeader-)
> are actually identical to those articles in the NOV database ?

  Those are probably cancelled articles (if there are existing articles both
above and below the missing article) although it could also be a history
database corruption problem (when articles are removed from the history file
but not actually removed, you can get a large gap). It is then necessary for
the news admin to run some procedure to "rediscover" those articles and
either get rid of them or re-add them to the history file. This step is news-
server-specific.

> When I iterate through some of the article numbers that a NEXT command
> (or XHDR SomeHeader-) will jump over, I am often able to obtain path
> lines using the HEAD command. I would not expect this, as I think the
HEAD command gets the header out of the saved article. What does the news
server you're talking to report itself as (on the initial connect line)?

> nothing else). My second question is;  is this XHDR command (with the
> first article number followed by a hyphen), using the NOV database
> also, or is it using some other database that may be unreliable for a
> news client to rely on ?

  This is an implementation decision.

> At the moment, I am wondering if I should perform and XOVER- command,
> and obtain an overview of all NOV articles, and then specifically
> request Path field bodies, and NNTP-Posting-Host field bodies, using
> each article's number or message id ?  If the XOVER- command is only
> returning the same article numbers as the above XHDR (and NEXT)
> command, then I could skip an overview where overview data is not
> essential, and simply use these other commands. Uppermost in my mind,
> is the reliability of and support for commands like XHDR and XPAT as
> opposed to XOVER ?

  XPAT isn't in Reference NNTP (yet - I'll be adding it if I stay with that
code for my server - right now I'm waiting for solid Diablo reader support
and then I'll need to decide to merge my local stuff into Diablo or stay
with Reference NNTP). Reference NNTP is pretty uncommon these days, though.

  If you're going to plow through all the articles on a server, I think
you need to see which operations that specific server handles most
efficiently. Asking the server admin is a _good_ idea. If you asked me, I
would say I would much prefer to give you a header-only feed than to have
you trying to read every article off my server.

> What is the future looking like for NNTP server software ?  What
> changes might I expect to encounter in during the next few years?

  There will be lots of reader servers that support readers coming out, which
will likely have very different efficiency tradeoffs compared to the current
servers.

> PS. I'm not sure if this is the best newsgroup to pose these
> questions; please let me know if there is a more appropriate one.

  Looks fine to me.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Re: Q: XHDR and XOVER
#26724
Author: Simon R Knight
Date: Tue, 10 Mar 1998 00:00
20 lines
1258 bytes
Thankyou Terry and fluffy@meow.org (Fluffy) for responding to my
questions. I found your answers both helpful and informative.

I recently located a web site:

http://www.mibsoftware.com/userkt/0099.htm

  ... which has collected some interesting NNTP related info. Tonight
I am planning to write some code to parse the data returned via XOVER,
and I have a set a buffer of 2048 bytes for each line. In view of the
length of some of these XOVER lines, is 2048 bytes about right, or is
it over-kill ?


Thanks !

Simon R Knight

Re: Q: XHDR and XOVER
#26768
Author: Forrest J. Cavalier III
Date: Wed, 11 Mar 1998 00:00
41 lines
2049 bytes
In article <350bb4e4.2706429@news.tcp.co.uk>, srk@bigfoot.com wrote...
>
>Thankyou Terry and fluffy@meow.org (Fluffy) for responding to my
>questions. I found your answers both helpful and informative.
>
>I recently located a web site:
>
>http://www.mibsoftware.com/userkt/0099.htm
>
>  ... which has collected some interesting NNTP related info. Tonight
>I am planning to write some code to parse the data returned via XOVER,
>and I have a set a buffer of 2048 bytes for each line. In view of the
>length of some of these XOVER lines, is 2048 bytes about right, or is
>it over-kill ?

The starting point for "The Developer's Section" of the Usenet RKT:
	http://www.mibsoftware.com/userkt/forsoft.htm

-------------------------------------------------------------------
To answer the question on what size XOVER buffer....

Why don't you have a look at the code in INN nnrpd to see how it
handles XOVER?  nnrpd/article.c, and lib/qio.c

Everything in INN is freely available for "borrowing" and "stealing."

There are no restrictions on how INN or parts of it gets used,
commercially or non-commercially.

(To answer the question, the maximum size line that INN can serve
as XOVER is of size QIO_BUFFER, a configurable parameter, often
set to 8192.  BUT SOMETIMES SET LARGER.)

Have fun!

Forrest J. Cavalier III
Mib Software


Re: Q: XHDR and XOVER
#26772
Author: Fluffy
Date: Wed, 11 Mar 1998 00:00
40 lines
2342 bytes
Simon R Knight <srk@bigfoot.com> wrote:
: I recently located a web site:
: 
: http://www.mibsoftware.com/userkt/0099.htm
: 
:   ... which has collected some interesting NNTP related info.

Yup, he's got a nifty collection of information there.  If you really want
to learn about the nuts and bolts of what goes on inside a news server, I
also highly recommend downloading the source code for C News and the
so-called reference NNTP implementation.

Even though the most common server today is INN, the C News sources have
*much* better comments and documentation, and do a good job of explaining
why news servers do a lot of bizarre things that don't seem to make sense.
INN was sort of built with the assumption that you already understood C
News, and a few INN bits like overview and the history index are direct
descendants.

The official home of C News is
ftp://ftp.cs.toronto.edu/pub/c-news/c-news.tar.Z -- they request that you
restrict your downloads to the evenings.

Reference NNTP can be found at
ftp://ftp.academ.com/pub/nntp1.5/nntp.1.5.12.2.tar.gz

You probably won't be able to do much with either of these unless you have a
Unix machine available.

: Tonight
: I am planning to write some code to parse the data returned via XOVER,
: and I have a set a buffer of 2048 bytes for each line. In view of the
: length of some of these XOVER lines, is 2048 bytes about right, or is
: it over-kill ?

Can you use a heap or something instead?  The references in particular can
grow to outlandish sizes, and I think that 2K may cause you grief.

Re: Q: XHDR and XOVER
#26783
Author: Simon R Knight
Date: Thu, 12 Mar 1998 00:00
46 lines
2358 bytes
On 11 Mar 1998 13:37:02 GMT, mibsoft@mibsoftware.com (Forrest J.
Cavalier III) wrote:

>To answer the question on what size XOVER buffer....
>
>Why don't you have a look at the code in INN nnrpd to see how it
>handles XOVER?  nnrpd/article.c, and lib/qio.c

I hope I don't become an outcast by saying this  ... but I'm afraid I
don't have any experience with Unix. My experience of programming
began two years ago with "Borland Delphi's Object Pascal".
>
>Everything in INN is freely available for "borrowing" and "stealing."

If I were to be honest, I don't think I would understand much of it.
What I can understand though, are any guidelines on implementing
clients so that they will work well with the NNTP server network. Many
of the things that I read at the above site were really helpful in
this respect.

>(To answer the question, the maximum size line that INN can serve
>as XOVER is of size QIO_BUFFER, a configurable parameter, often
>set to 8192.  BUT SOMETIMES SET LARGER.)

That's interesting !  I could provide an 8 k buffer, or even larger if
this would be useful to NNTP servers. As I presently understand
things, the main avantage in using a buffer of this size, is that it
helps servers by preserving long "References: " headers; are there
other reasons which also make a buffer of this size (or larger ?)
desireable ?

>Have fun!
>

Definitely !

 : )

Simon R Knight

PS. Any further pointers or guidance on what constitutes an "ideal"
client from a server's perspective, would be very welcome from anyone.
Thanks !

Re: Q: XHDR and XOVER
#26786
Author: USENET news
Date: Thu, 12 Mar 1998 00:00
33 lines
2243 bytes
In article <350360c6.17001868@news.tcp.co.uk>,
Simon R Knight <srk@bigfoot.com> wrote:
>I am trying to learn a little about NNTP, and have written a small
>program that enables me to talk to an NNTP port. During my
>experimentation, I have observed some behaviour among different news
>servers that has raised questions that I have been unable to answer by
>studiying the RFC's. Perhaps someone in this newsgroup may be able to
>help me with answers to these questions.
>...
>When I iterate through some of the article numbers that a NEXT command
>(or XHDR SomeHeader-) will jump over, I am often able to obtain path
>lines using the HEAD command. As I am particularly interested in
>scanning path lines and NNTP-Posting-Hosts for analysis, these
>otherwise bypassed article numbers are significant, and yet it isn't
>practical to iterated throught thousands of non-existent article
>headers. 

If your primary goal is to analyse article header information and it's more 
than a one-off experiment with a small amount of data, the efficient way to
do it would be on the server, at least if it's running INN - you can
configure a dummy feed of article header data, either to a file or to a
channel (i.e. a program which reads and processes the data as INN writes it,
as the articles arrive). That does assume you are in a position to do it on
the server, and that it's running INN (or something that be configured to do
the same sort of thing).

                                John Line
-- 
Cambridge University Computing Service - USENET news manager.
newsmaster@ucs.cam.ac.uk    (alias {newsmaster,news,usenet}@news.cam.ac.uk)

Re: Q: XHDR and XOVER
#26857
Author: Simon R Knight
Date: Fri, 13 Mar 1998 00:00
22 lines
1589 bytes
On 12 Mar 1998 12:45:07 -0000, news@news.cam.ac.uk (USENET news)
wrote:

>If your primary goal is to analyse article header information and it's more 
>than a one-off experiment with a small amount of data, the efficient way to
>do it would be on the server, at least if it's running INN - you can
>configure a dummy feed of article header data, either to a file or to a
>channel (i.e. a program which reads and processes the data as INN writes it,
>as the articles arrive). That does assume you are in a position to do it on
>the server, and that it's running INN (or something that be configured to do
>the same sort of thing).

Thanks for this suggestion, although in my own case, I am do not have
access to a server of this kind. My primary goal in analysing header
information, is to gain an insight into good NNTP programming.


Simon R Knight


Re: Q: XHDR and XOVER
#26869
Author: Fluffy
Date: Sat, 14 Mar 1998 00:00
12 lines
1247 bytes
Terry Kennedy <terry@spcunb.spc.edu> wrote:
:   XPAT isn't in Reference NNTP (yet - I'll be adding it if I stay with that
: code for my server - right now I'm waiting for solid Diablo reader support
: and then I'll need to decide to merge my local stuff into Diablo or stay
: with Reference NNTP). Reference NNTP is pretty uncommon these days, though.

Got it.  Most of the work is already done in xhdr.c.  Steal nnrpd's Glom
(got real lazy and stole xmalloc too) and it's just a few lines to glue it
all together.

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