Thread View: news.software.nntp
2 messages
2 total messages
Started by Mark Hoffman
Wed, 12 Nov 1997 00:00
Quickly retrieving headers from a newsgroup
Author: Mark Hoffman
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
41 lines
2310 bytes
2310 bytes
All, I'm working on some software that needs to have the ability to pull articles of a news server. I'm using RFC 977 as my Bible and have sucessfully made most of the code work just fine. Trouble is, it is really slow. For example, I need the ability to retrieve the headers of messages that have been added since a certain date. Since my news server does not support the NEWNEWS command, I wrote code that retrieves all of the headers in the group and then analyzes them later. Obviously, it is hugely inefficient to download all of the headers everytime, just to check to see which ones have been added. I tried setting the article pointer to the last article, then using the LAST command to move backwards through the articles, hoping that once I saw an article with a date that was less than the date I was checking for, I could stop checking. But I've since learned that using the LAST command doesn't necessarily return the articles in chronological order. Even if that wasn't a problem, when it retrieves the headers it seems so slow. All of my newsreaders can download 300 headers in about 2 seconds on my connection (400 kb satellite). My program takes several minutes! All I am doing is issuing a LAST command, followed by a HEAD command. But it is still slow. Does anyone have any ideas what I might be doing wrong? Are there easier ways to accomplish what I'm after? If someone could even just point me to an article, white paper, etc. I would be most grateful. Thanks in advance, Mark Hoffman
Re: Quickly retrieving headers from a newsgroup
Author: Forrest J. Cavalier III
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
54 lines
2784 bytes
2784 bytes
In article
<1BCCA6CDCB037A0A.657F110DA02551D3.8C970AD883221242@library-proxy.airnews.net>,
lynx@lynxbroadcasting.com wrote...
>
>All,
>
>I'm working on some software that needs to have the ability to pull articles
>of a news server.
>
>I'm using RFC 977 as my Bible and have sucessfully made most of the code
>work just fine. Trouble is, it is really slow.
>
>For example, I need the ability to retrieve the headers of messages that
>have been added since a certain date. Since my news server does not support
>the NEWNEWS command, I wrote code that retrieves all of the headers in the
>group and then analyzes them later.
>
>Obviously, it is hugely inefficient to download all of the headers
>everytime, just to check to see which ones have been added. I tried setting
>the article pointer to the last article, then using the LAST command to move
>backwards through the articles, hoping that once I saw an article with a
>date that was less than the date I was checking for, I could stop checking.
>But I've since learned that using the LAST command doesn't necessarily
>return the articles in chronological order.
Articles are numbered in the order they are received, which is probably
not in the chronological order they were created.
>
>Even if that wasn't a problem, when it retrieves the headers it seems so
>slow. All of my newsreaders can download 300 headers in about 2 seconds on
>my connection (400 kb satellite). My program takes several minutes! All I am
>doing is issuing a LAST command, followed by a HEAD command. But it is still
>slow.
>
>Does anyone have any ideas what I might be doing wrong? Are there easier
>ways to accomplish what I'm after? If someone could even just point me to an
>article, white paper, etc. I would be most grateful.
Most newsreaders remember the highest number previously seen. Anything
higher than that is new.
Also, see the XOVER command, listed on the NNTP protocol page
http://www.mibsoftware.com/userkt/0099.htm
And the Usenet RKT for developers, which has links to lots....
http://www.mibsoftware.com/userkt/forsoft.htm
Forrest J. Cavalier III, Mib Software
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