🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
17 messages
17 total messages Started by t.h.i.s.n.t.h.a.t DS Thu, 10 Oct 2002 17:16
Custom Client Software - Last Quick Question
#61278
Author: t.h.i.s.n.t.h.a.t DS
Date: Thu, 10 Oct 2002 17:16
54 lines
3149 bytes
Last one, I promise, for a few days anyway, until I get to the next 'not 
clearly defined nntp issue'.

When a msg is cross-posted to say 3 groups, does each of the groups have a 
msg in it, each with their own unique msg ID?

Or is it referenced somehow to one msg. Not counting the XREF field (which 
is serverMsgID) because I planned to use the unique msgID as a key field.

I'm sure your going to tell me that each cross-posted msg has a unique 
msgID in each of the groups it's shows up in and this (once again) will 
cause me more processing to keep things organized properly. :)

After I wrote the above I realized this is probably a stupid question 
because each msg requires a unique msgID.

I just wasn't sure and there was a discussion in a group a while ago 
complaining about cross-posting large binary files, which caused older 
articles to expire quickly because you are posting to each group the same 
info.
Someone later replied saying that wasn't the case (now), because the files 
that are posted are saved into the original group and only references to it 
are sent.

At that point it made sense to me, but after going thru this whole 
excercise as I am currently doing, I now question that. 

NNTP (in itself) may have no concept of binaries or multi-part binaries 
files it just doesn't seem possible.

Further more, if it is possible, that would be server side voodoo correct?, 
and my objective, is to use commands that have been implemented for a long 
time to help promote compliance to ANY news server (within reason of 
course, I am using XOVER which I do not believe was in the original NNTP 
spec).

It's going to be hard enough managing messages and parts, let alone trying 
to implement some commands on server x because it supports it, and use this 
command sequence on server y, because it doesn't.

Last one, does anyone recommend/not recommend sending more than one command 
on a command string. 

ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF

I myself prefers to wait for the response code from a command before 
sending any additional commands. This may be an issue depending on your 
connection speed, and I am aiming at broadband users.


Thank you again.

DS
Re: Custom Client Software - Last Quick Question
#61280
Author: Bas Ruiter
Date: Thu, 10 Oct 2002 18:02
92 lines
4699 bytes
> When a msg is cross-posted to say 3 groups, does each of the groups have a 
> msg in it, each with their own unique msg ID?

If the message is posted one time to all three groups, then there is
only one message and one msgID.

The Newsgroups: header determines what newsgroups the msg shows up in.

In each Newsgroup I *think* the msg has an article number that applies
only in that newsgroup. If I'm not mistaken, these are the numbers
after the groups in the Xref: header. But check that out with someone
else if that is so, because I'm hazy on that.

> because I planned to use the unique msgID as a key field.

MsgID is -the- key field for a msg.

> I just wasn't sure and there was a discussion in a group a while ago 
> complaining about cross-posting large binary files, which caused older 
> articles to expire quickly because you are posting to each group the same 
> info.
> Someone later replied saying that wasn't the case (now), because the files 
> that are posted are saved into the original group and only references to it 
> are sent.
> 
> At that point it made sense to me, but after going thru this whole 
> excercise as I am currently doing, I now question that. 

Yeah, I can understand the confusion.

Let's put it like this - posting something to one newsgroup, or
crossposting it to several newsgroups at once "costs" the same. Only
one instance of the articles are stored (on disk), and references
to this one copy apear in all newsgroups.

But I can understand the complaints too - servers are 'pipes'. First
in, first out. Any time something is posted, something else is lost
on the other side.

> NNTP (in itself) may have no concept of binaries or multi-part binaries 
> files it just doesn't seem possible.

NNTP is just concerned with the distribution of the articles. It's not
concerned with what's IN those articles.

> Further more, if it is possible, that would be server side voodoo correct?,

Some (all) newsservers are binary aware, but that's because of the
software they use that inspects the articles. Nothing to do with NNTP
protocol as such.

> and my objective, is to use commands that have been implemented for a long 
> time to help promote compliance to ANY news server (within reason of 
> course, I am using XOVER which I do not believe was in the original NNTP 
> spec).

Someone here said recently that "INN is how NNTP is done" (read, what
the current practise is). So have a look at the commands it supports.

> Last one, does anyone recommend/not recommend sending more than one command 
> on a command string. 
> 
> ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF

Uhm... no idea really. I guess it would depend on what commands you were
looking to group together.

If the GROUP command in your example failed for example, then your HEAD
command will probably return an undefined result - maybe an error code,
maybe the headers of the group you are already in before you tried
switching.

> I myself prefers to wait for the response code from a command before 
> sending any additional commands. This may be an issue depending on your 
> connection speed, and I am aiming at broadband users.

I would do that too - send a command, wait for the reply, etc.

If you want to speed things up, use multiple connections / threads. (The
News guys are gonna hit me for saying that).


 Bas Ruiter

-- 

[ l o r d s n o w @home.nl    http://members.home.nl/ l o r d s n o w ]

 Only when the population of 50 mysteriously dropped to 7 did the
 remainder start to suspect Hungry.
Re: Custom Client Software - Last Quick Question
#61281
Author: Bas Ruiter
Date: Thu, 10 Oct 2002 18:15
27 lines
1721 bytes
Here's some links to NNTP / News stuff I've collected over the years:

"Don't Write A Newsreader"
http://www.newsreaders.com/misc/twpierce/news/newsreader-manifesto.html

"Good Netkeeping Seal of Approval"
http://www.gnksa.org/

"News related RFCs and Drafts"
http://www.tin.org/docs.html

Note there are new RFC's in the make for News article layout, and the
NNTP protocol itself.

Happy reading ;)


 Bas Ruiter

-- 

[ l o r d s n o w @home.nl    http://members.home.nl/ l o r d s n o w ]

 Only when the population of 50 mysteriously dropped to 7 did the
 remainder start to suspect Hungry.
Re: Custom Client Software - Last Quick Question
#61282
Author: Curt Welch
Date: Thu, 10 Oct 2002 18:24
34 lines
2716 bytes
t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t (DS) wrote:
> Last one, does anyone recommend/not recommend sending more than one
> command on a command string.
>
> ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF
>
> I myself prefers to wait for the response code from a command before
> sending any additional commands. This may be an issue depending on your
> connection speed, and I am aiming at broadband users.

In the above example, if the xxxxx argument for HEAD is number, you would
never want to send them together like that.  That's becaues the GROUP
command may fail, leving the current group what it was before the command,
so the HEAD command may end up returning a HEADER for article NNN is the
previous group.

You could of course ignore the header which came back in that case (if one
came back at all), but I see no reaon to do that.

Mostly, clients will always wait for a response to commands.

There are a few times where you logically don't have to wait (like if you
were doing a string of stat commands, or a string of group commands where
you just wnated to see the result and didn't need it to set the current
group).  If you have a bulk application like that, it will run much faster
if you send the entire batch (say you wanted to do a stat command on 1000
artciels), but it's harder to code that stuff and is seldom done.  So for
sure, start off by always waiting for the response and then look for times
where you feel you might want to do something tricker later.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Custom Client Software - Last Quick Question
#61283
Author: Jøhnny Fävòrítê (it means "dna s...
Date: Thu, 10 Oct 2002 18:28
38 lines
2791 bytes
DS wrote:
> When a msg is cross-posted to say 3 groups, does each of the groups
> have a msg in it, each with their own unique msg ID?

Nope, it's just one message.  It will be available from all cross-posted
groups but no matter which you get it from it will be exactly the same,
including the message ID.

> NNTP (in itself) may have no concept of binaries or multi-part
> binaries files it just doesn't seem possible.

You haven't been around very long, have you.

> Further more, if it is possible, that would be server side voodoo
> correct?, and my objective, is to use commands that have been
> implemented for a long time to help promote compliance to ANY news
> server (within reason of course, I am using XOVER which I do not
> believe was in the original NNTP spec).

Nonetheless, XOVER is entirely safe to use.  You'll be hard-pressed to
find a server that doesn't support it.  Usenet is one area of the
Internet where the RFCs lag behind actual practice, unfortunately.

> Last one, does anyone recommend/not recommend sending more than one
> command on a command string.
>
> ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF
>
> I myself prefers to wait for the response code from a command before
> sending any additional commands. This may be an issue depending on
> your connection speed, and I am aiming at broadband users.

If you get into lockstep mode with the server, i.e., you send a command,
wait for the response, send another command, etc., you will DRASTICALLY
reduce the bandwidth-use/speed of your client, due to all those pauses.
If you want to be professional about it you're pretty much forced to
gang up multiple commands to keep your pipes flowing at all times.
Re: Custom Client Software - Last Quick Question
#61286
Author: Juergen Helbing
Date: Thu, 10 Oct 2002 19:05
35 lines
2063 bytes
curt@kcwc.com (Curt Welch) wrote:

>So for
>sure, start off by always waiting for the response and then look for times
>where you feel you might want to do something tricker later.

I would not subscribe to that statement - after writing MyNews for three
years now.
A programming sequence which is based on send-wait-receive-send...
is so differently from a "send-send-send.....   read-read-read" approach
that the produced software is unusable later.

My (very personal and subjective) tips would be:

Write your code from the beginning as if would have to handle a stream
of replies. Here: feed the full responses to a parser.

In the specific case - groups... head.... I personally would _always_ 
wait if the group is valid (wait for the response). But issuing
50 head/article commands with WAIT is not acceptable - especially if
the programmers targets high speed (DSL) audience.
(A better method for head-head-head is to use the msgid instead
of the article number. Then the group command is not necessary at all).

Creating a "small program" first - and expanding it later without
having enough thought about the fundamental structure results
often in instable structure.


Personal experiences....

-- 
Juergen

Re: Custom Client Software - Last Quick Question
#61287
Author: Juergen Helbing
Date: Thu, 10 Oct 2002 19:12
26 lines
1506 bytes
t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t (DS) wrote:

>NNTP (in itself) may have no concept of binaries or multi-part binaries 
>files it just doesn't seem possible.

NNTP is a transport layer protocol.
The _content_ of the messages is a different RFC.

UUencode is the oldest "content-description" for binaries.
yEnc is "kinda successor" (it defines also a subject line).

MIME is the most powerful conception - which has been just
poorly adapted to Usenet because it requires that the messages
are already on your local disk. 


We (this newsgroup - and others) have been working on binary 
concepts for more a long time now. We're still in discussion 
- and are trying to find 'concepts'. Until now we've just good ideas....


Stay tuned.
-- 
Juergen

Re: Custom Client Software - Last Quick Question
#61296
Author: Jon Bell
Date: Fri, 11 Oct 2002 00:54
22 lines
1684 bytes
In article <k1fbqu4pfvuu0t849nvqthsq5kd23q6c19@4ax.com>,
Bas Ruiter  <lordsnow@home.nl> wrote:
>
>> When a msg is cross-posted to say 3 groups, does each of the groups have a 
>> msg in it, each with their own unique msg ID?
>
>If the message is posted one time to all three groups, then there is
>only one message and one msgID.
>
>The Newsgroups: header determines what newsgroups the msg shows up in.
>
>In each Newsgroup I *think* the msg has an article number that applies
>only in that newsgroup. 

And only on the particular server that you retrieved the article from.  
Artlcle numbers are local to individual news servers, whereas Message-IDs 
are global.

-- 
Jon Bell <jtbellap8@presby.edu>                     Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
Re: Custom Client Software - Last Quick Question
#61300
Author: Unknown
Date: Fri, 11 Oct 2002 04:12
85 lines
4752 bytes
it's not that i haven't been programming for long time, but this is my 
first venture into the wonderful world or usenet.

i've been using it for years, but have never had to learn the 
underpinning's of it. 

my programming experience has been moslty in rs232 based UI applications, 
database solutions, and (utilities for personal use). as i was writing that 
last line i realized that since the utilities portion has included a lot of 
file operations, with the rs232 and database this adds up to the 3 of the 
most important functions of a newsreader (IMO). i did dabble in plc 
programming and to a lesser extent, when i was designing automated assembly 
equipment, cnc programming.

i already have functions done of managing servers, downloading groups from 
said servers, subscribing and unsubscribing, and downloading headers from 
subscribed groups, from each server.

i like to develop one task at a time, very methodically, getting each 
individual part up to snuff before moving on to the next. i spent a good 8 
hours on just making sure all the parts of the UI resize properly. i've got 
a bunch of good information over the last couple days, from people who've 
been thru it (are doing it), and now am going to code....an code...uh...and 
re-code....then re-code again....then maybe some new code.....(it never 
truly stops).

so i'm just gonna keep pounding away at it, with every intent to produce a 
quality piece of software, but.......

i'm also going to remember that i could fail miserably, that 2 months down 
the road I may have such an overblown, lumpy, unstable clusterf*** that I 
may become frustrated with the whole project and just abandon it as others 
have.

....today high hopes, next week, next month, two months, maybe despair, who 
knows, but i've challenged myself, so it goes.......

DS





this.is@totally.fake.com (J�hnny F�v�r�t� (it means "dna strands in my 
hair")) wrote in <PM0003ACAACC20881E@minion.nashville.comcast.net>:

>DS wrote:
>> When a msg is cross-posted to say 3 groups, does each of the groups
>> have a msg in it, each with their own unique msg ID?
>
>Nope, it's just one message.  It will be available from all cross-posted
>groups but no matter which you get it from it will be exactly the same,
>including the message ID.
>
>> NNTP (in itself) may have no concept of binaries or multi-part
>> binaries files it just doesn't seem possible.
>
>You haven't been around very long, have you.
>
>> Further more, if it is possible, that would be server side voodoo
>> correct?, and my objective, is to use commands that have been
>> implemented for a long time to help promote compliance to ANY news
>> server (within reason of course, I am using XOVER which I do not
>> believe was in the original NNTP spec).
>
>Nonetheless, XOVER is entirely safe to use.  You'll be hard-pressed to
>find a server that doesn't support it.  Usenet is one area of the
>Internet where the RFCs lag behind actual practice, unfortunately.
>
>> Last one, does anyone recommend/not recommend sending more than one
>> command on a command string.
>>
>> ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF
>>
>> I myself prefers to wait for the response code from a command before
>> sending any additional commands. This may be an issue depending on
>> your connection speed, and I am aiming at broadband users.
>
>If you get into lockstep mode with the server, i.e., you send a command,
>wait for the response, send another command, etc., you will DRASTICALLY
>reduce the bandwidth-use/speed of your client, due to all those pauses.
>If you want to be professional about it you're pretty much forced to
>gang up multiple commands to keep your pipes flowing at all times.

Re: Custom Client Software - Last Quick Question
#61321
Author: Bas Ruiter
Date: Fri, 11 Oct 2002 18:30
34 lines
2452 bytes
> Last one, does anyone recommend/not recommend sending more than one command 
> on a command string. 
> 
> ie- GROUP alt.testCR/LF HEAD xxxxxxCR/LF
> 
> I myself prefers to wait for the response code from a command before 
> sending any additional commands. This may be an issue depending on your 
> connection speed, and I am aiming at broadband users.

Respond from Quade (author of NewsBin):

I don't batch commands. Hasn't seemed to be much point to it. I don't
use any commands that seem to require batching. If I was repeatedly
doing "HEAD" or something like that I'd be tempted too. 
I use XOVER to extract all the header information I need. Basically the
only thing Newsbin needs is the subject and the record number to work.
The size lets me do some range checking. The message ID lets me uniquely
identify the posts but, it's really optional. That's about it. 
One problem is many servers don't respond the same way. At one point I
was pulling article bodies based on the message ID. This is standard
according to the NNTP specs. Problem was several large news servers
would return the wrong post. 
 

 Bas Ruiter

-- 

[ l o r d s n o w @home.nl    http://members.home.nl/ l o r d s n o w ]

 Only when the population of 50 mysteriously dropped to 7 did the
 remainder start to suspect Hungry.
Re: Custom Client Software - Last Quick Question
#61324
Author: t.h.i.s.n.t.h.a.t DS
Date: Fri, 11 Oct 2002 20:36
52 lines
2925 bytes
archiver@i3w.com (Juergen Helbing) wrote in
<4005l.aa2202@archiver.winews.net>: 

>curt@kcwc.com (Curt Welch) wrote:
>
>>So for
>>sure, start off by always waiting for the response and then look for
>>times where you feel you might want to do something tricker later.
>
>I would not subscribe to that statement - after writing MyNews for three
>years now.
>A programming sequence which is based on send-wait-receive-send...
>is so differently from a "send-send-send.....   read-read-read" approach
>that the produced software is unusable later.
>
>My (very personal and subjective) tips would be:
>
>Write your code from the beginning as if would have to handle a stream
>of replies. Here: feed the full responses to a parser.

That is what I have been doing up until this point, and will continue to do 
so. i will continue testing to see what is reliable where and try to cut 
corners only when necessary, and of course fully test these cut corners as 
well.

>
>In the specific case - groups... head.... I personally would _always_ 
>wait if the group is valid (wait for the response). But issuing
>50 head/article commands with WAIT is not acceptable - especially if
>the programmers targets high speed (DSL) audience.
>(A better method for head-head-head is to use the msgid instead
>of the article number. Then the group command is not necessary at all).
>
>Creating a "small program" first - and expanding it later without
>having enough thought about the fundamental structure results
>often in instable structure.

which is not what i'm doing. stability is my #1 concern, then followed by 
speed. after complete stable functionality is achieved, i will then re-
evaluate all the functions and such and work on the speed at that time.


DS

'other' personal experiences, product development tho, not software.

>
>
>Personal experiences....
>

Re: Custom Client Software - Last Quick Question
#61325
Author: Curt Welch
Date: Fri, 11 Oct 2002 20:44
45 lines
3207 bytes
t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t (DS) wrote:
> archiver@i3w.com (Juergen Helbing) wrote in
> <4005l.aa2202@archiver.winews.net>:
>
> >curt@kcwc.com (Curt Welch) wrote:
> >
> >>So for
> >>sure, start off by always waiting for the response and then look for
> >>times where you feel you might want to do something tricker later.
> >
> >I would not subscribe to that statement - after writing MyNews for three
> >years now.
> >A programming sequence which is based on send-wait-receive-send...
> >is so differently from a "send-send-send.....   read-read-read" approach
> >that the produced software is unusable later.
> >
> >My (very personal and subjective) tips would be:
> >
> >Write your code from the beginning as if would have to handle a stream
> >of replies. Here: feed the full responses to a parser.

I agree with that BTW as long as that is where you expect to end up.
Based on what had been said so far however, I didn't expect him to
every end up there.  If spotting "(X/Y)" anywhere in the subect instead
of only at the end is something you "debate doing", then writing
code to correctly deal with async commands is not likely in my mind
to happen (particlaly because I know it's only needed if you are interested
in squeezing a 5% performance improvement out of your code for a 200%
increase in complexity).

> >Creating a "small program" first - and expanding it later without
> >having enough thought about the fundamental structure results
> >often in instable structure.

For sure.  But the truth is, if you don't know what you are doing before
you start, you are fored to do that, and you _will_ in up with sections of
code that is a total mess and will need to be thrown out and rewritten from
the ground up now that you understand what is needed.

All software has to be written at least twice to get them right.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Custom Client Software - Last Quick Question
#61328
Author: t.h.i.s.n.t.h.a.t DS
Date: Fri, 11 Oct 2002 23:48
104 lines
5292 bytes
see the end for my thoughts plz.....

curt@kcwc.com (Curt Welch) wrote in
<20021011164437.597$MG@newsreader.com>: 

>t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t (DS) wrote:
>> archiver@i3w.com (Juergen Helbing) wrote in
>> <4005l.aa2202@archiver.winews.net>:
>>
>> >curt@kcwc.com (Curt Welch) wrote:
>> >
>> >>So for
>> >>sure, start off by always waiting for the response and then look for
>> >>times where you feel you might want to do something tricker later.
>> >
>> >I would not subscribe to that statement - after writing MyNews for
>> >three years now.
>> >A programming sequence which is based on send-wait-receive-send...
>> >is so differently from a "send-send-send.....   read-read-read"
>> >approach that the produced software is unusable later.
>> >
>> >My (very personal and subjective) tips would be:
>> >
>> >Write your code from the beginning as if would have to handle a
>> >stream of replies. Here: feed the full responses to a parser.
>
>I agree with that BTW as long as that is where you expect to end up.
>Based on what had been said so far however, I didn't expect him to
>every end up there.  If spotting "(X/Y)" anywhere in the subect instead
>of only at the end is something you "debate doing", then writing
>code to correctly deal with async commands is not likely in my mind
>to happen (particlaly because I know it's only needed if you are
>interested in squeezing a 5% performance improvement out of your code
>for a 200% increase in complexity).
>
>> >Creating a "small program" first - and expanding it later without
>> >having enough thought about the fundamental structure results
>> >often in instable structure.
>
>For sure.  But the truth is, if you don't know what you are doing before
>you start, you are fored to do that, and you _will_ in up with sections
>of code that is a total mess and will need to be thrown out and
>rewritten from the ground up now that you understand what is needed.
>
>All software has to be written at least twice to get them right.
>

I agree totally with the last statement about now knowing what you are 
doing.

In my case this is only partially true. the only thing i don't know what 
i'm doing, but methodically coding, is the NNTP protocol, which is 
obviously why i'm here.

please correct any of the folowing statements if you disagree. i'm not 
stating these as facts, i am stating these as my opinions as formed by my 
current excercise and past usenet use experience. 

there are 3 basic operations, strictly related to NNTP TRANSFER (no 
posting)

1- Download grouplists
2- Download Headers
3- Download articles & decode files

i am now on step 2. i have a lot of experience with database programming, 
and IMO, NNTP readers are more of a database application than anything 
else.

download group names into a database - then subscribe/unsubscribe
download headers into a database - then combine multipart's (probably the 
most tricky as far as the database procedure's are concerned.
download article parts to disk, combine, decode.

i know i'm over simplifying this, but these (IMO) are the main functions.

i am developing this as a multi-user database application, which in it's 
own right isn't the easiest thing to do.

so to say i don't know what i'm doing (not that you said that, i know it 
was a general statement) is only partially correct because of my 
unfamiliarity with the NNTP protocol.

i am developing in a 'component' fashion, that is, call a single function 
to d/l headers, or groups, or whatever and writing marshalling procedures 
to keep everything in check between threads. and when i'm donw, tour right, 
i'll probably have to re-code a bunch of it.

DS


PS- (again, i know it was a general statement) i'm using the same procedure 
to check for (part/totalParts) no matter where it is in the subject line.

so the big questions here is.....

should i find what appears to be a (part/totalParts reference) in the 
subject line, how far towards the beginning of the subject line would you 
think it should be interpereted as such. even if it's the first thing in 
the subject?

Thanks again.

Re: Custom Client Software - Last Quick Question
#61331
Author: Curt Welch
Date: Sat, 12 Oct 2002 02:40
115 lines
6964 bytes
t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t (DS) wrote:
> there are 3 basic operations, strictly related to NNTP TRANSFER (no
> posting)
>
> 1- Download grouplists
> 2- Download Headers
> 3- Download articles & decode files

There is posting of course. But maybe you don't intend to suport that with
your tool.  But yes, you have the basic idea above.  Once you connect and
get authenticated, then all you need for the basics is LIST ACTIVE, GROUP,
XOVER, ARTICLE.  You can make a fine newsreader using only those.  But as
you you add more advanced fatures to your newsreader, and try to do fancer
things, you can end up using just about all the NNTP commands.

> i am now on step 2. i have a lot of experience with database programming,
> and IMO, NNTP readers are more of a database application than anything
> else.

An NNTP server is nothing but a custom designed article database.  The
newsreader is just a database browsing tool.  How much of the database
you choose to download and cache on your local system is a function of
what you are trying to do with your application.  The more you download
and cache, the more complex it gets.

> download group names into a database - then subscribe/unsubscribe
> download headers into a database - then combine multipart's (probably the
> most tricky as far as the database procedure's are concerned.
> download article parts to disk, combine, decode.
>
> i know i'm over simplifying this, but these (IMO) are the main functions.

Yeah, the basics aren't to tough.  The deatals can keep you busy for the
rest of you life however (partly because they change constantly).

> i am developing this as a multi-user database application, which in it's
> own right isn't the easiest thing to do.

An NNTP server is a multiuser application.  Most people choose to let the
multiuser part stay on the server side.  If you need multiuser power
locally, then most people will chose to implement a real NNTP server
localy, instead someting else.  But there are lots of ways to do it, each
with their own sets of advanatages and disadvanates.

> so to say i don't know what i'm doing (not that you said that, i know it
> was a general statement) is only partially correct because of my
> unfamiliarity with the NNTP protocol.

I have no idea what I'm doing is at least some part of all the code I
write.  The goal is to know what you are doing when you are done, not when
you start. :)

> i am developing in a 'component' fashion, that is, call a single function
> to d/l headers, or groups, or whatever and writing marshalling procedures
> to keep everything in check between threads. and when i'm donw, tour
> right, i'll probably have to re-code a bunch of it.

I personaly write all my code by starting with something small and evolving
it into to final work.  I've never tried to track it, but I'm sure I throw
away as much as I write for everything I do.  I do that for news postings
as well.  Sometimes I spend an hour writting a message and then just decide
it's not worth posting and throw it all way.

> PS- (again, i know it was a general statement) i'm using the same
> procedure to check for (part/totalParts) no matter where it is in the
> subject line.

:)

> so the big questions here is.....
>
> should i find what appears to be a (part/totalParts reference) in the
> subject line, how far towards the beginning of the subject line would you
> think it should be interpereted as such. even if it's the first thing in
> the subject?

Anywhere in the line.  Even if it's the first thing.  At least that is how
I would code it.  I think. (I'd have to check to be sure).

The general algorithm requires you to sort the entire list first, and then
try to match up subjects.  When sorted (correctly), the subjects should be
in order for you, so the job becomes one of trying to figure out if the
current article.

Sorting 100,000 headers however is slow, so that's big issue number 1.
Newsreaders not geared for downloading multpart posts solve the problem
many times by simply not downloading that many headers at once.  And some
simply crash if you actually try to do it.  But a download tool must deal
with huge group lists these days, and must deal with them quickly.  So you
have to do some fairly advanced stuff like hashing the headers as a way to
quickly group them together as you download.  And to save memory, you only
save one copy of of each subject instead of saving 50 or 100 copies
(dealing with the fact that all the subjects are in fact different).

Then there is all the problems you have to deal with.  Like multiple
articles with the exact same subject but one is the multipart post you are
looking for and the others are text followup messages.  Or some happen from
the first attempt a guy made to post a file, but when his modem
disconnected, he started again, but used the same subjects the second time.
Etc.

There's no end to the crap you find in newsgroups that will confuse your
code if you don't add special cases to deal with it.

And the same stuff happens with news servers as well - like articles which
don't show up in the XOVER data in the high-low range from the group
command but yet, when checked again an hour later, are there.  Or articles
which are listed but in fact are not available for download.  And having to
deal with issues like a newsgroup which gets renumbed.  There's no end to
the fun to be had when writing usenet software. :)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Custom Client Software - Last Quick Question
#61332
Author: Bas Ruiter
Date: Sat, 12 Oct 2002 03:23
48 lines
3017 bytes
> > should i find what appears to be a (part/totalParts reference) in the
> > subject line, how far towards the beginning of the subject line would you
> > think it should be interpereted as such. even if it's the first thing in
> > the subject?

> Anywhere in the line.  Even if it's the first thing.  At least that is how
> I would code it.  I think. (I'd have to check to be sure).

The poster (or posting software) is free to use the Subject: line is
he/she/it wishes.

Yes, common practise is that the (n/N) it to be found at/near the end,
but it MAY be anywhere.

-where- it appears isn't so much of a problem, as long as it's the only
thing in round brackets in the Subject: line. If there are more (../..)
in the Subject: line then things get difficult - you have to decide
which is the right one - I would concentrate on that.

> The general algorithm requires you to sort the entire list first, and then
> try to match up subjects.  When sorted (correctly), the subjects should be
> in order for you

I would sort by author, and then by a combination of time & subject. I
think.

> ... And some simply crash if you actually try to do it.  But a download
> tool must deal with huge group lists these days, and must deal with them
> quickly.

Actually.. if this "binary aware" stuff goes ahead, then the server
could, theoretically, only send the first header of a multi-post and
somehow indicate how many parts (and which) it has.

  Subject: blah blah "guitar solo.mp3" yEnc (1-18/20)



 Bas Ruiter

-- 

[ l o r d s n o w @home.nl    http://members.home.nl/ l o r d s n o w ]

 Only when the population of 50 mysteriously dropped to 7 did the
 remainder start to suspect Hungry.
Re: Custom Client Software - Last Quick Question
#61338
Author: Curt Welch
Date: Sat, 12 Oct 2002 06:35
32 lines
2850 bytes
Bas Ruiter <lordsnow@home.nl> wrote:
> Actually.. if this "binary aware" stuff goes ahead, then the server
> could, theoretically, only send the first header of a multi-post and
> somehow indicate how many parts (and which) it has.
>
>   Subject: blah blah "guitar solo.mp3" yEnc (1-18/20)

At first thought, I'm not seeing how anything like that could be done in a
way that won't break current newsreaders.

But as a future NNTP extenstion, some special versions of XOVER could be
created to do fun thinks like that.  You might have one header-like command
which would only list the binary articles from the group and do it in some
format where you don't get tons and tons of duplciate subject and from
data.

And their might be a text-only xover (TOVER) command which would either
block the binary articles from the list or do something like you mention
above which would be to create a single entry to represent all the articles
for the multipart post.  It might not be the "binary" itself, but just a
fake message that when you read it, would give you human readable summary
of how much of the set was currently on the server and give you a special
url or message-id which a newsreader could spot and allow you to click on
it to tell it you wanted to download that file.

Lots of interesting thigns could happen down the road if a standard like
this took hold on Usenet.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Custom Client Software - Last Quick Question
#61339
Author: Bas Ruiter
Date: Sat, 12 Oct 2002 06:52
33 lines
2448 bytes
> > Actually.. if this "binary aware" stuff goes ahead, then the server
> > could, theoretically, only send the first header of a multi-post and
> > somehow indicate how many parts (and which) it has.
> >
> >   Subject: blah blah "guitar solo.mp3" yEnc (1-18/20)

> At first thought, I'm not seeing how anything like that could be done in a
> way that won't break current newsreaders.

*laughs*

You're right. But I wasn't thinking of current newsreaders.. just
indulging in fantasies of how things may be done in the future :)

It just popped into my head reading your previous post, and it
seemed a nice way to cut down on all the XOVER traffic between
client and server.

I was actually thinking of the server making an article on the fly
for every binary post, containing the msgid's of all the needed
parts... maybe some extra info too, as yu say.


 Bas Ruiter

-- 

[ l o r d s n o w @home.nl    http://members.home.nl/ l o r d s n o w ]

 Only when the population of 50 mysteriously dropped to 7 did the
 remainder start to suspect Hungry.
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