🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
9 messages
9 total messages Started by Jake Wed, 23 Jun 2004 03:12
Download headers within a date range
#150527
Author: Jake
Date: Wed, 23 Jun 2004 03:12
17 lines
1759 bytes
1. Are there any news readers that can download headers within a
specified date range?

2. The closest I've seen is Xnews's ability to download headers within
a message numbers.  Are there any other readers with similar
functionality?

This question has been asked at least a couple of times:

http://groups.google.com/groups?th=744ca8f98c4b8cb6
http://groups.google.com/groups?th=1d6a8ea1f6ee4ef8

I bring this up again because from what I've seen of the NNTP
protocol, what I'm asking should be possible:  The lower and upper
message numbers in a group can be determined (as Xnews does) and a
binary search within this range can quickly hone in on the first
message that was posted on a specified date.
Re: Download headers within a date range
#150530
Author: Murray Peterson
Date: Wed, 23 Jun 2004 03:40
19 lines
1866 bytes
jakelundy@hotmail.com (Jake) wrote in 
news:b5178b80.0406221912.5a02c93f@posting.google.com:

> I bring this up again because from what I've seen of the NNTP
> protocol, what I'm asking should be possible:  The lower and upper
> message numbers in a group can be determined (as Xnews does) and a
> binary search within this range can quickly hone in on the first
> message that was posted on a specified date.

A simple binary search will fail, since the message numbers are somewhat 
sparse (ordered, but not necessarily contiguous).  It's still possible to 
speed up the search, but in all but the larger groups, it would 
(probably) be simpler and faster to download all the headers, and then 
discard the ones not wanted.

-- 
Murray Peterson
Email: murray_peterson@shaw.ca (remove underscore)
URL:   http://members.shaw.ca/murraypeterson/
Re: Download headers within a date range
#150539
Author: Ralph Fox
Date: Wed, 23 Jun 2004 08:32
28 lines
1834 bytes
On Wed, 23 Jun 2004 03:40:28 GMT, in article
<Xns9510DD9025CA0farkle@24.71.223.159>, Murray Peterson wrote:


> > message that was posted on a specified date.

> message numbers are somewhat 
> sparse 

This can happen.

> ordered

Not necessarily perfectly so, for two reasons

1.  The order in which messages arrive on server 'X' is not necessarily
    the same as the order in which messages are posted on their own
    respective servers.  This is because of propagation delays.

2.  Some server farms can allocate message numbers out of order.



-- 
Cheers,
Ralph

Change is inevitable.  Progress is optional.
Re: Download headers within a date range
#150544
Author: Jake
Date: Wed, 23 Jun 2004 14:17
19 lines
2065 bytes
Murray Peterson <mwp@home.com.invalid> wrote in message news:
> 
> A simple binary search will fail, since the message numbers are somewhat 
> sparse (ordered, but not necessarily contiguous).  It's still possible to 
> speed up the search, but in all but the larger groups, it would 
> (probably) be simpler and faster to download all the headers, and then 
> discard the ones not wanted.

You are right about the sparsity of the message numbers.  A workaround
is to use the STAT and LAST/NEXT nntp commands.  If I want to find the
message number half way between 1 and 10, I'd STAT for message 5, and
if the STAT fails, I do a LAST to find the previous message number.

I am dealing with groups with more than a million messages so it would
not be faster to download all headers.

An assumption I made was that messages are ordered by date.  So
message number 10 should have an earlier date than message number 11. 
I don't know if this is true.
Re: Download headers within a date range
#150545
Author: Jake
Date: Wed, 23 Jun 2004 14:42
20 lines
1983 bytes
Ralph Fox <ralphfralphf@xtraxtra.coco.nznz.undo-echo.invalid> wrote in message news:<m9fid0t3euq3rpdsikv315l7ek9klo30ee@news02.tsnz.net>...
> > ordered
> 
> Not necessarily perfectly so, for two reasons

Thanks.  You just answered my question (in another post) about ordered
dates.

> 1.  The order in which messages arrive on server 'X' is not necessarily
>     the same as the order in which messages are posted on their own
>     respective servers.  This is because of propagation delays.

In practice the delays don't seem too bad.  That is two consecutive
message numbers don't seem to have dates that are more than a day
apart, or is it commonly this bad?

> 2.  Some server farms can allocate message numbers out of order.

This seems like a bug.  Is there some efficiency reason for servers to
do this?
Re: Download headers within a date range
#150553
Author: Murray Peterson
Date: Wed, 23 Jun 2004 17:19
33 lines
2203 bytes
Ralph Fox <ralphfralphf@xtraxtra.coco.nznz.undo-echo.invalid> wrote in 
news:m9fid0t3euq3rpdsikv315l7ek9klo30ee@news02.tsnz.net:

> On Wed, 23 Jun 2004 03:40:28 GMT, in article
> <Xns9510DD9025CA0farkle@24.71.223.159>, Murray Peterson wrote:
> 
> 
>> > message that was posted on a specified date.
> 
>> message numbers are somewhat 
>> sparse 
> 
> This can happen.
> 
>> ordered
> 
> Not necessarily perfectly so, for two reasons
> 
> 1.  The order in which messages arrive on server 'X' is not necessarily
>     the same as the order in which messages are posted on their own
>     respective servers.  This is because of propagation delays.
> 
> 2.  Some server farms can allocate message numbers out of order.

Sorry, see that I wasn't being clear enough.  I wasn't talking about how 
the messages arrive at the server or how they are allocated -- I was 
talking about how the NNTP protocol will deliver the messages to a program 
when I perform an XOVER command.

-- 
Murray Peterson
Email: murray_peterson@shaw.ca (remove underscore)
URL:   http://members.shaw.ca/murraypeterson/
Re: Download headers within a date range
#150555
Author: Murray Peterson
Date: Wed, 23 Jun 2004 17:40
30 lines
2430 bytes
jakelundy@hotmail.com (Jake) wrote in
news:b5178b80.0406230617.31d5ec93@posting.google.com: 

> You are right about the sparsity of the message numbers.  A workaround
> is to use the STAT and LAST/NEXT nntp commands.  If I want to find the
> message number half way between 1 and 10, I'd STAT for message 5, and
> if the STAT fails, I do a LAST to find the previous message number.

That won't work as you might expect.  If you get "unlucky" and hit a non-
existent message number, the STAT command will not set the "current article 
pointer" at all, and therefore the LAST command will fail with a "No 
previous article" error.  At least, this is how my server behaves.

> I am dealing with groups with more than a million messages so it would
> not be faster to download all headers.

Does your server support XHDR for the date field?  If so, that may be the 
best solution.

> An assumption I made was that messages are ordered by date.  So
> message number 10 should have an earlier date than message number 11. 
> I don't know if this is true.

It's not true for all servers; some of them allocate older message numbers 
for newer articles.

-- 
Murray Peterson
Email: murray_peterson@shaw.ca (remove underscore)
URL:   http://members.shaw.ca/murraypeterson/
Re: Download headers within a date range
#150557
Author: MartinS
Date: Wed, 23 Jun 2004 21:49
25 lines
1861 bytes
jakelundy@hotmail.com (Jake) wrote:

> 1. Are there any news readers that can download headers within a
> specified date range?
> 
> 2. The closest I've seen is Xnews's ability to download headers within
> a message numbers.  Are there any other readers with similar
> functionality?
> 
> This question has been asked at least a couple of times:
> 
> http://groups.google.com/groups?th=744ca8f98c4b8cb6
> http://groups.google.com/groups?th=1d6a8ea1f6ee4ef8
> 
> I bring this up again because from what I've seen of the NNTP
> protocol, what I'm asking should be possible:  The lower and upper
> message numbers in a group can be determined (as Xnews does) and a
> binary search within this range can quickly hone in on the first
> message that was posted on a specified date.

In Xnews Open Special, you can apply a filter for messages posted within 
the last x days, or older than x days. I don't know how this works.

-- 
Martin S.
Re: Download headers within a date range
#150602
Author: Jake
Date: Thu, 24 Jun 2004 14:10
6 lines
1454 bytes
MartinS <me@my.place> wrote in message news:<40d9facf$0$25065$892e0abb@auth.newsreader.octanews.com>...
> In Xnews Open Special, you can apply a filter for messages posted within 
> the last x days, or older than x days. I don't know how this works.

I believe Xnews downloads all the headers and only *displays* posts
within the last x days.
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