🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #54783

Re: Article numbering and handling article number rollover

#54783
From: Andrew Gierth
Date: Wed, 24 Oct 2001 03:06
37 lines
2412 bytes
[Bogus "Distribution: inet" removed.]

>>>>> "Howard" == Howard Siegel <not.interested@nospam.invalid> writes:

 Howard> I need to write a specialized NNTP client program (NOT a full
 Howard> fledged news reader!) and as I have not tried to read through
 Howard> any of the "brand name" news readers as yet (but I have very
 Howard> little time to devote to this project), I'd like the sage
 Howard> advise of the experts on the matter....

 Howard> 1) What is the largest article number that I can expect to
 Howard> get back from the NNTP server?

2^32-1

 Howard> Is a signed 32 integer sufficient to hold article numbers?

no, but an unsigned one is. (note also that 0 is not a valid article
number)

 Howard> 2) What is the proper way to detect rollover of the article
 Howard> numbers?

Article numbers don't roll over; the server breaks instead :-)

(Seriously, 2^32 articles is a _lot_, enough for over 10 thousand
years at 1000 articles per day.)

What _can_ happen is that the server dies and is replaced, or the
article numbers are reset for some other reason. If the article
numbers returned from the server are wildly different from the old
ones, you may want to throw the old info away (after confirming with
the user) and reset.

-- 
Andrew.
Technical Details
Message-ID: <87lmi120ui.fsf@erlenstar.demon.co.uk>
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!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonster
References: <9r5agg$7ma$1@news.panix.com>

Show Full Headers
Complete Article Headers
Message-ID: <87lmi120ui.fsf@erlenstar.demon.co.uk>
Subject: Re: Article numbering and handling article number rollover
Date: Wed, 24 Oct 2001 03:06:29 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <9r5agg$7ma$1@news.panix.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!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonster
Newsgroups: news.software.nntp,news.software.readers
Organization: disorganised
Lines: 36
NNTP-Posting-Host: erlenstar.demon.co.uk (4cda:0187)
X-Mayan-Date: Long count = 12.19.8.12.2; tzolkin = 8 Ik; haab = 0 Zac
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-Attribution: AG
X-P-Persistent-Headers: are a bad idea.
X-Newsreader: Gnus v5.5/Emacs 20.2
X-Complaints-To: andrew@erlenstar.demon.co.uk
X-Post-Filter: postfilter v0.6 alpha