🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #85443

Re: NNTP API (Java)

#85443
From: Jeffrey M. Vinocur
Date: Sat, 16 Feb 2013 22:15
54 lines
3167 bytes
In article <j204v9-5j2.ln1@dur.bounceme.net>,
Thufir Hawat  <hawat.thufir@gmail.com> wrote:
>I'm not quite understanding the NNTP protocol as it relates to article 
>numbers upstream and downstream.  I'm using Java at the moment.
>
>Using the GNU NNTP API:
>
>http://www.gnu.org/software/classpathx/javamail/

I'm not at all familiar with this, but from the code snippet and
link you provided, I think this may not be a sufficiently
sophisticated framework to be useful to you.


>So, it seems like what's really needed is the value of response.last, and 
>then anything, err, ?greater? than response.last (for the message ID int) 
>should be what's fetched.

Correct.  If you don't know about RFC 3977, you probably should
start there.


>When leafnode gets NNTP articles, it does something like:
>
>news.software.nntp: skipping articles 1-27275 inclusive (initial limit)
>news.software.nntp: considering articles 27276 - 27284
>
>so it's using some logic to determine the article number to request, and 
>then requests a range.  Can someone explain a bit the mechanics of how a 
>downstream "client" knows what range of articles to ask for from the 
>upstream "server"?  I'm running leafnode, which *is* a server (I think), 
>so the nomenclature throws me a bit there.

The client has to keep track (on its own) of what the highest
article number it has seen for a given group, and then request
whatever is above that.


>My concern is that the "id" isn't reliable:
>
>"Note that the message number for a particular Message can change during 
>a session if other messages in the Folder are deleted and expunged."
>
>http://docs.oracle.com/javaee/6/api/javax/mail/
>Message.html#getMessageNumber%28%29

This is nonsense.  It is fundamental to NNTP (see the RFC 3977 as
I suggested above) that the article numbers are fixed, not only
within a session, but for the long term (on a particular server).


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <kfp0d4$ktf$1@puck.litech.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.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet.blueworldhosting.com!news.glorb.com!news.litech.org!.POSTED!not-for-mail
References: <j204v9-5j2.ln1@dur.bounceme.net>

Show Full Headers
Complete Article Headers
Message-ID: <kfp0d4$ktf$1@puck.litech.org>
Subject: Re: NNTP API (Java)
Date: Sat, 16 Feb 2013 22:15:00 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <j204v9-5j2.ln1@dur.bounceme.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.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet.blueworldhosting.com!news.glorb.com!news.litech.org!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 54
Sender: jeff@litech.org
NNTP-Posting-Host: mail.litech.org
X-Trace: puck.litech.org 1361052900 21423 204.16.242.142 (16 Feb 2013 22:15:00
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sat, 16 Feb 2013 22:15:00 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)
X-Original-Bytes: 2955