Article View: news.software.nntp
Article #87989Re: LIST ACTIVE low & high water limits and wraparound
From: news
Date: Sat, 20 Jul 2019 23:22
Date: Sat, 20 Jul 2019 23:22
49 lines
3256 bytes
3256 bytes
Mateusz Viste <mateusz@wont.tell> wrote: > > I am playing a little with the NNTP protocol these days, and I have some > doubts about the 'LIST ACTIVE' command. > > RFC 3977 describes LIST ACTIVE as follows: > > [...] > > Unfortunately I was unable to find any description of the low water and > high water values - how high are they allowed to grow? Could they wrap > over time? From an implementation point of view, this makes me wondering > about the numeric type that these marks should be stored... a 16-bit > integer is certainly too small, but would an unsigned 32-bit integer be > okay? As far as I understand, the RFC requires that an article number is never reused and that new articles have higher numbers than older articles (according to the time the articles are first received on the server). Section 6 requires 31-bit integers to be used for article numbers (and zero is not a valid article number). It would seem to require that they never wrap. (In the case where it is going to wrap because the server has been replaced and the old data has been lost, or whatever other reason it may be, then perhaps, you may wish to notify the users of such a case.) (My bystand program assumes that they never wrap or are reused, and that new articles always have higher numbers than older ones (according to the time the articles are received, not the time they are send), unless the NewNews option is enabled, but the user can alter the data in the client's database if necessary.) My own "sqlnetnews" (server) software and "bystand" (client) software both use 64-bit integers for article numbers, despite what the RFC says. (It won't use zero or negative numbers though.) (However, bystand does not use article numbers at all if the NewNews option is enabled.) Probably I do not expect there will be so many messages that it will exceed the range required by RFC 3977, anyways. In terms of SQL (or at least, SQLite), it would seem to require that AUTOINCREMENT is used in order to meet the requirement specified by the RFC, although my own server instance doesn't use it (but since I do not delete messages, or at least not the newest message, this doesn't matter). (If you configure your own instance, you can configure the database schema however you want, so you can use AUTOINCREMENT if you want to.) -- Note: I am not always able to read/post messages during Monday-Friday.
Technical Details
Message-ID:
<1563663361.bystand@zzo38computer.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mailReferences:
<5cd011d5$0$15174$426a74cc@news.free.fr>Show Full Headers
Complete Article Headers
Message-ID: <1563663361.bystand@zzo38computer.org> Subject: Re: LIST ACTIVE low & high water limits and wraparound Date: Sat, 20 Jul 2019 23:22:53 +0000 From: news@zzo38computer.org.invalid References: <5cd011d5$0$15174$426a74cc@news.free.fr> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail Newsgroups: news.software.nntp Organization: Aioe.org NNTP Server Lines: 47 NNTP-Posting-Host: U158MBNsLt97drbZ2zludw.user.gioia.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: bystand/0.3.0 X-Notice: Filtered by postfilter v. 0.9.2 X-Received-Bytes: 3305 X-Received-Body-CRC: 3898976021