Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Problem with newsgroup message count Re:(3)

From: kevin:sunshinecable at: 1-Sep-2000 23:24

On Fri, 1 Sep 2000 [jeff--rebol--net] wrote:
> > > > When requesting number of messages for newsgroup > > > fr.misc.finance we got 1000000 ! although there are less > > > than 3000 messages. How can we cope with that ? > > > > The built-in nntp protocol (nntp://) appears to always > > return 1000000 as the length of the group. > > > > The problem is news servers lie.
<news server admin mode> *My* news server NEVER lies... <wink> </off>
> inquire. The count data returned from nntp servers isn't > supposed to be reliable, so the series metaphor is kind of > weak in this case (especially compared to pop:// for > instance). 1000000 was just an arbitrary large number for > the length of the port since it is indeterminable. Do you > think it would be better to have whatever the server said > about the message count there?
Well, from the news server's perspective, the high and low counts returned (as demonstrated in the sample code Jeff attached) will be reasonably accurate as of the time of the request. Some of the older articles may have already vanished, particularly if CNFS storage is being used (cyclic buffers, which is what I run on my INN server), and of course new ones could arrive moments after the request. If you're going to return an arbitrary number though, I'd suggest taking the (high - low) count and returning that... at least it will be *closer* to the actual number of articles on the server. There will never be *more* than (high - low), and factoring cancelled and expired messages usually less. Having a smaller number the 1000000 should also improve things if reading messages in a loop. (FWIW, my news server kept about 1000000 new articles yesterday across *all* groups I carry -- and threw away about 1000000 more from groups that I don't.) Cheers, Kev