Thread View: news.software.nntp
23 messages
23 total messages
Started by Russ Allbery
Sun, 17 Apr 2005 00:41
[NNTP] LISTGROUP
Author: Russ Allbery
Date: Sun, 17 Apr 2005 00:41
Date: Sun, 17 Apr 2005 00:41
109 lines
5336 bytes
5336 bytes
As promised, here's my proposed text for LISTGROUP that makes the command
a mandatory part of READER and adds a range argument.
This is presented for discussion to see if we can reach consensus that
this is a good idea. I'm also copying this to news.software.nntp to get
more implementor eyes on it. If this proposal goes into the draft, it
would mean that in order to claim NNTPv2 compliance, implementing
LISTGROUP with a range argument would be mandatory.
Please note that I think there's at least an even chance that the result
of this discussion will be to reject this idea as too late in the process
or too different from existing practice, but the idea achieved enough
support that I wanted to put together a whole proposal.
6.1.2 LISTGROUP
6.1.2.1 Usage
Indicating capability: READER
Syntax
LISTGROUP [group [range]]
Responses
211 number low high group Article numbers follow (multiline)
411 No such newsgroup
412 No newsgroup selected [1]
Parameters
group = name of newsgroup
range = number(s) of articles
number = estimated number of articles in the group
low = reported low water mark
high = reported high water mark
[1] The 412 response can only occur if no group has been specified.
6.1.2.2 Description
The LISTGROUP command is used to get a listing of some or all the
article numbers in a particular newsgroup. As a side effect, it also
selects the group in the same way as the GROUP command (see Section
6.1.1).
The first optional argument is the name of the newsgroup to be selected
(e.g. "news.software.misc"). If no group is specified, the current
selected newsgroup is used.
The second optional argument, range, may be any of the following:
o an article number
o an article number followed by a dash to indicate all following
o an article number followed by a dash followed by another article
number
If no range is specified, the range 1- is assumed. If the name of the
newsgroup is not specified, the range may not be specified.
On success, the list of article numbers is returned as a multi-line
response following the 211 response code (the arguments on the initial
response line are the same as for the GROUP command). The list
contains one number per line, is in numerical order, and lists
precisely those articles that exist in the group at the moment of
selection whose numbers are within the given range. This list may be
empty if no articles in the group have numbers within the given range.
If the group specified is not available on the server, a 411 response
MUST be returned. If no group is specified and the current selected
newsgroup is invalid, a 412 response MUST be returned.
In all other aspects the LISTGROUP command behaves identically to the
GROUP command.
6.1.2.3 Examples
Example of LISTGROUP on an empty group:
[C] LISTGROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup list follows
[S] .
Example of LISTGROUP on a valid current selected newsgroup:
[C] GROUP misc.test
[S] 211 2000 3000234 3002322 misc.test
[C] LISTGROUP
[S] 211 2000 3000234 3002322 misc.test list follows
[S] 3000234
[S] 3000237
[S] 3000238
[S] 3000239
[S] 3002322
[S] .
Example of LISTGROUP with a range:
[C] LISTGROUP misc.test 3000239-
[S] 211 2000 3000234 3002322 misc.test list follows
[S] 3000239
[S] 3002322
[S] .
Example of LISTGROUP with an empty list:
[C] LISTGROUP misc.test 3002400-3002420
[S] 211 2000 3000234 3002322 misc.test list follows
[S] .
Example of LISTGROUP failing because no group has been selected:
[Assumes current selected newsgroup is invalid.]
[C] LISTGROUP
[S] 412 no current group
[C] GROUP example.is.sob.bradner.or.barber
[S] 411 no such group
[C] LISTGROUP
[S] 412 no current group
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: [NNTP] LISTGROUP
Author: Mark Crispin
Date: Mon, 18 Apr 2005 23:03
Date: Mon, 18 Apr 2005 23:03
39 lines
2783 bytes
2783 bytes
My comments: I think that I've expressed my dismay at NNTP's abuse of 4xx codes before, and 411 and 412 are no exception. 412 in particular offends me; if this isn't properly a 5xx code I have a hard time thinking of what would be. Can we get rid of that "estimated" from "estimated number of articles in the group"? As far as I am concerned, an estimated value is worse than useless, and an NNTPv2 compliant server should be required to give an exact value. What is a "reported" high and low water mark as opposed to a high and low water mark? In a range, how is 5-1 interpreted? Is it equivalent to 1-5? Note that if 5-1 is equivalent to 1-5, then 5- is equivalent to 4-5 if 4 is the highest article number (and you need to change that "all following" text). If it is it an error, then there needs to be an error code. Should lists of article numbers/ranges be allowed, e.g. 1-5,14-34,56- ? Your first two examples have two extraneous spaces after the command. Are these significant for some reason? Your first example is really of a "never posted to group" instead of an "empty group". You probably should have a separate empty group example. Your second, third, and fourth examples show estimates for the number of articles, and back up my point about the overall uselessness of the estimates. Please let's have exact values. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
Re: [NNTP] LISTGROUP
Author: Russ Allbery
Date: Tue, 19 Apr 2005 00:05
Date: Tue, 19 Apr 2005 00:05
83 lines
5270 bytes
5270 bytes
Mark Crispin <MRC@CAC.Washington.EDU> writes: > I think that I've expressed my dismay at NNTP's abuse of 4xx codes > before, and 411 and 412 are no exception. 412 in particular offends me; > if this isn't properly a 5xx code I have a hard time thinking of what > would be. So... I've tried to explain a few times that NNTP does not use the 400 and 500 conventions of other protocols like SMTP. NNTP can't be abusing something that it never followed and never even tried to follow in the first place. Are you not agreeing with my point, not understanding it, not remembering it...? I feel like I've tried to respond to this point on multiple occasions now, with apparently no change in your perception that NNTP thinks of 4xx as "temporary" and gets it wrong. 4xx has never meant temporary, or 5xx permanent, in the history of the NNTP protocol. If we were redoing the protocol from scratch, we'd use the same return code conventions as everyone else, but since we're not and since changing all the return codes obviously can't happen, I guess I don't see a lot of utility in discussing it. Anyway, LISTGROUP uses 411 and 412 in the way that every other command in NNTP with those error conditions does. > Can we get rid of that "estimated" from "estimated number of articles in > the group"? As far as I am concerned, an estimated value is worse than > useless, and an NNTPv2 compliant server should be required to give an > exact value. An exact value at the time that the command is issued that may have changed a second later doesn't strike me as much more useful than an estimated value. Anyway, no, we can't change this and stay within the charter of the working group (even putting aside the question of whether it's a feasible change to expect software to do). > What is a "reported" high and low water mark as opposed to a high and > low water mark? Same thing. I'm not sure why the word "reported" is there, but it's used fairly consistently through the rest of the draft as well. > In a range, how is 5-1 interpreted? Is it equivalent to 1-5? > Note that if 5-1 is equivalent to 1-5, then 5- is equivalent to 4-5 if 4 > is the highest article number (and you need to change that "all > following" text). > If it is it an error, then there needs to be an error code. That's a very good question, and one that we also need to answer for OVER, which has the same issue. INN historically (all the way back to 1.0!) has treated 5-1 as 5-, or in general n-m where m < n as equivalent to n-. I don't know if that's something we want to bless. There is no error, though. > Should lists of article numbers/ranges be allowed, e.g. 1-5,14-34,56- ? No, they're not allowed anywhere else that ranges are allowed. > Your first two examples have two extraneous spaces after the command. > Are these significant for some reason? I think they were intended to be examples that whitespace doesn't matter (they're in the existing LISTGROUP writeup). > Your first example is really of a "never posted to group" instead of an > "empty group". You probably should have a separate empty group example. It could be either; see 6.1.1 where this is discussed. One of those places where we're documenting existing practice, and while we have some leeway to revisit some of this given the NNTPv2 capability, this is really not one that I want to reopen; we need to finalize and publish something soon. > Your second, third, and fourth examples show estimates for the number of > articles, and back up my point about the overall uselessness of the > estimates. Please let's have exact values. At least one of those should probably be changed to show an exact value; I wasn't thinking about that when I copied and pasted the examples. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: [NNTP] LISTGROUP
Author: Russ Allbery
Date: Tue, 19 Apr 2005 00:14
Date: Tue, 19 Apr 2005 00:14
20 lines
2341 bytes
2341 bytes
Russ Allbery <rra@stanford.edu> writes: > An exact value at the time that the command is issued that may have > changed a second later doesn't strike me as much more useful than an > estimated value. Anyway, no, we can't change this and stay within the > charter of the working group (even putting aside the question of whether > it's a feasible change to expect software to do). To which I should probably also add that adding the range parameter to LISTGROUP is *also* stepping outside the charter of the group. It's in a way that I think is minor, and it seems so obviously useful and trivial to implement that I'm giving it a shot, but taking off my proposer hat and putting on my chair hat, that means that if consensus doesn't gell around it right quick, I'm going to declare it out of scope and move on. Basically, that means unless everyone loves the idea by the time we finalize the i18n language, it's out. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: [NNTP] LISTGROUP
Author: Mark Crispin
Date: Tue, 19 Apr 2005 00:36
Date: Tue, 19 Apr 2005 00:36
114 lines
6707 bytes
6707 bytes
On Mon, 18 Apr 2005, Russ Allbery wrote: > So... I've tried to explain a few times that NNTP does not use the 400 and > 500 conventions of other protocols like SMTP. NNTP can't be abusing > something that it never followed and never even tried to follow in the > first place. Are you not agreeing with my point, not understanding it, > not remembering it...? I understood you the first time. I disagree with the perpetuation of an arbitrary divergence from standard Internet protocol architecture which was clearly created by mistake rather than conscious decision. The issue isn't that NNTP has its own schema of response code; the issue is that NNTP has its own schema that overlaps a well-established scheme. > If we were redoing the protocol from scratch, we'd use the same return > code conventions as everyone else, but since we're not and since changing > all the return codes obviously can't happen, I guess I don't see a lot of > utility in discussing it. NNTPv2 offers a means to correct this mistake. Given that a CAPABILITY (or whatever you're calling it) command will be the first thing that an NNTPv2 client will issue, this also informs the server that the client is NNTPv2 compatible. So if you have any worries about pre-NNTPv2 clients, you have a means to deal with it. Eventually, we will have NNTPv2-only clients and servers which will disconnect if the other end isn't NNTPv2-compatible, and the old ways will be evil memories. There is precedent for this in IMAP. >> Can we get rid of that "estimated" from "estimated number of articles in >> the group"? As far as I am concerned, an estimated value is worse than >> useless, and an NNTPv2 compliant server should be required to give an >> exact value. > An exact value at the time that the command is issued that may have > changed a second later doesn't strike me as much more useful than an > estimated value. "Changed a second later"? Are you allowing announcement of new articles? > Anyway, no, we can't change this and stay within the > charter of the working group (even putting aside the question of whether > it's a feasible change to expect software to do). Quality server software can do the right thing. Protocols should not accomodate poorly-written server software. And there is no charter reason why NNTPv2 can't require a quality implementation. >> What is a "reported" high and low water mark as opposed to a high and >> low water mark? > Same thing. I'm not sure why the word "reported" is there, but it's used > fairly consistently through the rest of the draft as well. If you can't justify it, it should be removed. "Reported" means something totally meaningless that can be any arbitrary value or even a constant across all newsgroups. According to the specification the way you have it written, a compliant server can respond with "211 4294967296 4294967296 0 <ngname>" for all newsgroups. And yes, I mean an article count of "infinity", a "low water mark" of infinitity and a "high water mark" of zero. After all, these are just "estimates" and "reported" values, so they can be anything. Absurd? Yes. Valid according to the specification? Also yes. But, but, doesn't 6.1.1.2 ban that? No, because that's the GROUP command response. This is a different command response. If you want it to have the same semantics as GROUP then you must *say* that. >> In a range, how is 5-1 interpreted? Is it equivalent to 1-5? > That's a very good question, and one that we also need to answer for OVER, > which has the same issue. INN historically (all the way back to 1.0!) has > treated 5-1 as 5-, or in general n-m where m < n as equivalent to n-. I > don't know if that's something we want to bless. There is no error, > though. Decide upon something, and specify it. I don't care what is decided, as long as there's a decision and a specification of the decision. > I think they were intended to be examples that whitespace doesn't matter > (they're in the existing LISTGROUP writeup). In that case, the examples need to have a comment to that effect. >> Your first example is really of a "never posted to group" instead of an >> "empty group". You probably should have a separate empty group example. > It could be either; see 6.1.1 where this is discussed. Nope. That's the GROUP command, not the LISTGROUP command. If you want the rules of 6.1.1.2 to apply, you have to have an explicit reference to those rules in the LISTGROUP description. Otherwise, it is valid to claim that LISTGROUP works differently than GROUP. > One of those > places where we're documenting existing practice, and while we have some > leeway to revisit some of this given the NNTPv2 capability, this is really > not one that I want to reopen; we need to finalize and publish something > soon. Given how incredibly late this specification is already, I don't think that "lack of time" is justification to avoid fixing a real problem. There is no reason why the three zeros response should be allowed in an NNTPv2 compliant server. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Russ Allbery
Date: Tue, 19 Apr 2005 00:56
Date: Tue, 19 Apr 2005 00:56
97 lines
5786 bytes
5786 bytes
Mark Crispin <MRC@CAC.Washington.EDU> writes:
> I understood you the first time. I disagree with the perpetuation of an
> arbitrary divergence from standard Internet protocol architecture which
> was clearly created by mistake rather than conscious decision.
Okay. It's good to know that at least we've both understood each other,
even if we don't agree. :)
> NNTPv2 offers a means to correct this mistake. Given that a CAPABILITY
> (or whatever you're calling it) command will be the first thing that an
> NNTPv2 client will issue, this also informs the server that the client
> is NNTPv2 compatible. So if you have any worries about pre-NNTPv2
> clients, you have a means to deal with it.
I'm not willing to support changing the NNTP return codes for this draft.
>> An exact value at the time that the command is issued that may have
>> changed a second later doesn't strike me as much more useful than an
>> estimated value.
> "Changed a second later"? Are you allowing announcement of new
> articles?
No, I'm allowing articles to be withdrawn, which is the entire reason why
this is an estimate and not an exact number. When articles are cancelled,
the number of available articles in the group decreases immediately; at
any point after the cancel, if a client attempts to read the message, it
will be told the message number is not valid. This is true even if the
message number was previously returned by LISTGROUP, etc.
In practice, the estimate never errs on the low side, but does err on the
high side occasionally because it may or may not take into account all
cancels that have occurred in the group. I don't see a lot of use in
requiring a guarantee that the number be accurate at the time of the GROUP
command when it may become inaccurate due to the arrival of a cancel
message an instant later.
> But, but, doesn't 6.1.1.2 ban that? No, because that's the GROUP
> command response. This is a different command response. If you want it
> to have the same semantics as GROUP then you must *say* that.
So your feeling is that the statement:
In all other aspects the LISTGROUP command behaves identically to the
GROUP command.
is not adequate? How does that fall short? I'm happy to change the
wording to be more explicit; it is definitely my intention to defer to the
GROUP specification for all of these issues.
>> That's a very good question, and one that we also need to answer for
>> OVER, which has the same issue. INN historically (all the way back to
>> 1.0!) has treated 5-1 as 5-, or in general n-m where m < n as
>> equivalent to n-. I don't know if that's something we want to bless.
>> There is no error, though.
> Decide upon something, and specify it. I don't care what is decided, as
> long as there's a decision and a specification of the decision.
Okay. We've been using the standard language:
The range argument may be any of the following:
o an article number
o an article number followed by a dash to indicate all following
o an article number followed by a dash followed by another article
number
to describe ranges. I propose adding the following sentence after this
wording everywhere it occurs in our draft:
Any range specified as n-m where m is less than n is defined to be
equivalent to the range n-.
>> I think they were intended to be examples that whitespace doesn't
>> matter (they're in the existing LISTGROUP writeup).
> In that case, the examples need to have a comment to that effect.
Sure, that's fine with me.
> Given how incredibly late this specification is already, I don't think
> that "lack of time" is justification to avoid fixing a real
> problem. There is no reason why the three zeros response should be
> allowed in an NNTPv2 compliant server.
There's certainly merit to what you're saying (one particular method of
representing an empty group is already singled out with a SHOULD), but I'd
like to see slam-dunk working group consensus both around reopening this
and around promoting the SHOULD to a MUST now that we have NNTPv2. I
don't want to get bogged down in discussing it.
We may very well have that. If people have an opinion, please speak up.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Mark Crispin
Date: Tue, 19 Apr 2005 01:07
Date: Tue, 19 Apr 2005 01:07
59 lines
4017 bytes
4017 bytes
On Mon, 18 Apr 2005, Russ Allbery wrote:
> No, I'm allowing articles to be withdrawn, which is the entire reason why
> this is an estimate and not an exact number.
That isn't what I've seen. I've seen "estimates" that bear no
relationship to the number of articles at any time.
> In practice, the estimate never errs on the low side, but does err on the
> high side occasionally because it may or may not take into account all
> cancels that have occurred in the group.
I'm not sure, but I think that I have seen low-side estimates. After some
number of iterations, I ended up completely ignoring that value as being
worse than useless.
> So your feeling is that the statement:
> In all other aspects the LISTGROUP command behaves identically to the
> GROUP command.
> is not adequate? How does that fall short? I'm happy to change the
> wording to be more explicit; it is definitely my intention to defer to the
> GROUP specification for all of these issues.
Something like "The LISTGROUP command responds with the same 211 response
as a GROUP command (see section 6.1.1.2), and in addition returns..."
The fact that you describe this response separately for LISTGROUP implies
that the semantics of the response are different. You may feel that is
silly (and it is), but 5 years from now some twit will argue that unless
explicitly prohibited.
We're talking sad experience here. I have wasted many hours of my life
arguing such things with twits, and not even archives from the WG mailing
list were enough to dissuade the twit from insisting that the RFC "really
means" what he says it means.
> o an article number followed by a dash followed by another article
> number
> to describe ranges. I propose adding the following sentence after this
> wording everywhere it occurs in our draft:
> Any range specified as n-m where m is less than n is defined to be
> equivalent to the range n-.
That's OK with me.
Alternatively, you could do:
o an article number followed by a dash followed by another, higher,
article number
By the way, be careful about using the term "range". I once wasted a long
time arguing with a twit who insisted that IMAP ranges had the semantics
of mathematical ranges (that is, 5:2 is the empty set) even though there
was explicit text to the contrary, all because the word "range" was used.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 00:53
Date: Wed, 20 Apr 2005 00:53
65 lines
4191 bytes
4191 bytes
Mark Crispin <MRC@CAC.Washington.EDU> wrote: > My comments: > > I think that I've expressed my dismay at NNTP's abuse of 4xx codes > before, and 411 and 412 are no exception. 412 in particular offends me; > if this isn't properly a 5xx code I have a hard time thinking of what > would be. 411 and 412 are already well defined with LISTGROUP. You can't change them now withing risking breaking clients. > Can we get rid of that "estimated" from "estimated number of articles in > the group"? As far as I am concerned, an estimated value is worse than > useless, and an NNTPv2 compliant server should be required to give an > exact value. It's unresonable to expect an NNTP server to be able to calculate that value. In a group with 10 million articles receiving 20 new articles per second, and expiring them just as fast from what may be 100 different spools with different retentions it's just way too much CPU work to accuratly track the number of current articles in a group. My server tracks it accuratly for small groups, but when the CPU time to scan the group goes past 1/2 second it gives up and reports the best number it can. Many full feed servers these days can't even estimate the number anymore without actually trying to fetch every article in the group. In truth, if you wanted to make a change, that "estimate" should be removed because it's no longer resonable for many servers to calculate it. But for backward compatibility, we should just continue to support it as an estimated number. > What is a "reported" high and low water mark as opposed to a high and low > water mark? > > In a range, how is 5-1 interpreted? Is it equivalent to 1-5? > > Note that if 5-1 is equivalent to 1-5, then 5- is equivalent to 4-5 if 4 > is the highest article number (and you need to change that "all > following" text). > > If it is it an error, then there needs to be an error code. I don't think so. 5-1 means: "all articles with numbers >= 5, and <= 1". The answer to that question is "no articles". The question is not invalid to ask. GROUP and LIST already return low and high water marks where the high water mark is less than the low water mark for a group. So if a client takes those numbers, and passes them to LISTGROUP in order to dump the entire group, he should not get an error for an empty group, it should return an empty list. I agree that the spec should be clear about how to parse a range argument and when to return an error and when not. But I suspect that most servers do not see the above type of range as an error now so it should not be turned into one or else you risk breaking clients. But whatever is seen as the best way to do that should be documented in the spec for all range arguments. > Should lists of article numbers/ranges be allowed, e.g. 1-5,14-34,56- ? I don't see much value in that. A client can just issue multiple LISTGROUP commands if it really needs to do that. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 01:03
Date: Wed, 20 Apr 2005 01:03
30 lines
2867 bytes
2867 bytes
Russ Allbery <rra@stanford.edu> wrote: > Russ Allbery <rra@stanford.edu> writes: > > > An exact value at the time that the command is issued that may have > > changed a second later doesn't strike me as much more useful than an > > estimated value. Anyway, no, we can't change this and stay within the > > charter of the working group (even putting aside the question of > > whether it's a feasible change to expect software to do). > > To which I should probably also add that adding the range parameter to > LISTGROUP is *also* stepping outside the charter of the group. It's in a > way that I think is minor, and it seems so obviously useful and trivial > to implement that I'm giving it a shot, but taking off my proposer hat > and putting on my chair hat, that means that if consensus doesn't gell > around it right quick, I'm going to declare it out of scope and move on. > > Basically, that means unless everyone loves the idea by the time we > finalize the i18n language, it's out. LISTGROUP is almost useless now on large binary groups because it doesn't include a range argument. Because of that, commands like XOVER or XHDR are used instead. On my server, an XHDR message-id is as expensive as a full XOVER to the server, but LISTGROUP is very low cost and would be a much better choice for a client which only needed to verify which aticles were still available at the end of a group. Because the range is simple to add and backward compatible and useful, it sounds like a good move to me. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Russ Allbery
Date: Wed, 20 Apr 2005 01:07
Date: Wed, 20 Apr 2005 01:07
28 lines
2476 bytes
2476 bytes
Curt Welch <curt@kcwc.com> writes:
> I don't think so. 5-1 means: "all articles with numbers >= 5, and <=
> 1". The answer to that question is "no articles". The question is not
> invalid to ask. GROUP and LIST already return low and high water marks
> where the high water mark is less than the low water mark for a group.
> So if a client takes those numbers, and passes them to LISTGROUP in
> order to dump the entire group, he should not get an error for an empty
> group, it should return an empty list.
That would make sense, but INN has never done that. I'm happy to change
INN to do that instead, but at least the bit of precedent that I've looked
at goes a different direction.
I'd love to hear information about what other servers do.
> I agree that the spec should be clear about how to parse a range
> argument and when to return an error and when not. But I suspect that
> most servers do not see the above type of range as an error now so it
> should not be turned into one or else you risk breaking clients.
Yes, I don't think it should be an error.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 01:41
Date: Wed, 20 Apr 2005 01:41
67 lines
4858 bytes
4858 bytes
Mark Crispin <MRC@CAC.Washington.EDU> wrote: > On Mon, 18 Apr 2005, Russ Allbery wrote: > > So... I've tried to explain a few times that NNTP does not use the 400 > > and 500 conventions of other protocols like SMTP. NNTP can't be > > abusing something that it never followed and never even tried to follow > > in the first place. Are you not agreeing with my point, not > > understanding it, not remembering it...? > > I understood you the first time. I disagree with the perpetuation of an > arbitrary divergence from standard Internet protocol architecture which > was clearly created by mistake rather than conscious decision. > > The issue isn't that NNTP has its own schema of response code; the issue > is that NNTP has its own schema that overlaps a well-established scheme. And what problems does that cause in the real world? > NNTPv2 offers a means to correct this mistake. Given that a CAPABILITY > (or whatever you're calling it) command will be the first thing that an > NNTPv2 client will issue, this also informs the server that the client is > NNTPv2 compatible. So if you have any worries about pre-NNTPv2 clients, > you have a means to deal with it. That's just strikes me as stupid and anal. Intead of fixing a problem, it creates three real problems were we only have one minor one now. NNTP clients would have to be changed to support two protocols instead of one so that they could work with both V1 and V2 servers. V2 servers have to support both V1 and V2 for the old clients. The specifications would have to not only document V1, but V2, and to some extent, waste space explaining why it was useful to make the protocol and documention twice as complex just beacuse it was different than other internet protocols. The only reasons to make NNTP compatible with other protocols is to simplify the overall system in order to reduce problems. But by trying to fix something after the fact which isn't broken, you double the complexity of everything instead of making it simpler and in turn, will only increase the number of prolems instead of reducing them. Your suggestion would only make sense if you had made it years ago when NNTP was being first designed. It's not something that you can improve by changing it now. You can only make it worse by trying to change it now. > > Anyway, no, we can't change this and stay within the > > charter of the working group (even putting aside the question of > > whether it's a feasible change to expect software to do). > > Quality server software can do the right thing. Protocols should not > accomodate poorly-written server software. You clearly have never tried to write an NNTP server for a full feed. Try it one day before you acuse people of writing crapy code. Full feed servers are currently receiving 200 Mbits of data 24x7 and are receiving 70 some odd articles per second and they all expire articles at the same rate. To maintain accurate article counts for every group would require far more CPU resources and create great complexity in the server design that just isn't justified. Most clients don't even need to know the number. The few that use it tend to only show it to the user for information. > And there is no charter reason why NNTPv2 can't require a quality > implementation. Yeah, it's called a complete waste of time and money. I can gurantee you that if you put it in the spec, no one running a full feed server will follow the spec. Only little toy servers will do it. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 02:08
Date: Wed, 20 Apr 2005 02:08
58 lines
4015 bytes
4015 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > > > I don't think so. 5-1 means: "all articles with numbers >= 5, and <= > > 1". The answer to that question is "no articles". The question is not > > invalid to ask. GROUP and LIST already return low and high water marks > > where the high water mark is less than the low water mark for a group. > > So if a client takes those numbers, and passes them to LISTGROUP in > > order to dump the entire group, he should not get an error for an empty > > group, it should return an empty list. > > That would make sense, but INN has never done that. I'm happy to change > INN to do that instead, but at least the bit of precedent that I've > looked at goes a different direction. Yeah, I saw your follow up post about INN after I wrote that. That's very odd behavior. I wouldn't have guessed that in 1000 years. But notice however that if GROUP returns a highwater mark that is one below the low water mark, and you use that as a range, it does what I would consider as the right thing by luck - meaning it returns an empty list. I assume the behavior is just a side effect and not something done on purpose. There's no reason to make 100-85 be read as 100- is there? > I'd love to hear information about what other servers do. My server treats it like my example. L-H is seen as "all articles >= L and <= H". So it's seen as the empty set. Easynews on xover will return a single article for the low value so it in effect ignores the -H. diablo seems to work like mine and treat it as the empty set. A giganews server works the same as the easynews server and returns a single article matching the low value. This is probably a highwind server behavior. I also notice that if you use numbers below the range of the group, it changes them to be the first article in the group. So if the group is articles 10-20, and you do XOVER 1-2, or XOVER 2-1, it returns an xover record for article 10. So they must be adjusting the numbers to be within the group range before executing the command. That's just poor code in my book. If you ask for 5-9 it shouldn't return a record for 10 like the giganews server does. Going back and testing the easynews server I find it doesn't do that odd out-of-range behavior. So it looks to me like there isn't any consistency in how servers have dealt with this. None I tested treated it as an error however. They all either returned nothing or returned a single article. But I only tested the xover command. I didn't do a complete test on all the cases with all the commands that support a range. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Russ Allbery
Date: Wed, 20 Apr 2005 02:10
Date: Wed, 20 Apr 2005 02:10
34 lines
2799 bytes
2799 bytes
Curt Welch <curt@kcwc.com> writes:
> I assume the behavior is just a side effect and not something done on
> purpose. There's no reason to make 100-85 be read as 100- is there?
It looks like it was actually done on purpose. I'm not sure why.
> I also notice that if you use numbers below the range of the group, it
> changes them to be the first article in the group. So if the group is
> articles 10-20, and you do XOVER 1-2, or XOVER 2-1, it returns an xover
> record for article 10. So they must be adjusting the numbers to be
> within the group range before executing the command. That's just poor
> code in my book. If you ask for 5-9 it shouldn't return a record for 10
> like the giganews server does.
Yeah, that's completely broken.
> So it looks to me like there isn't any consistency in how servers have
> dealt with this. None I tested treated it as an error however. They
> all either returned nothing or returned a single article. But I only
> tested the xover command. I didn't do a complete test on all the cases
> with all the commands that support a range.
I would hope they'd treat them the same.
Okay, I'm leaning towards declaring INN broken and saying that if low is
higher than high, the right result is an empty list (for OVER and HDR as
well).
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Curt Welch
Date: Wed, 20 Apr 2005 02:23
Date: Wed, 20 Apr 2005 02:23
37 lines
3296 bytes
3296 bytes
Russ Allbery <rra@stanford.edu> wrote: > No, I'm allowing articles to be withdrawn, which is the entire reason why > this is an estimate and not an exact number. When articles are > cancelled, the number of available articles in the group decreases > immediately; at any point after the cancel, if a client attempts to read > the message, it will be told the message number is not valid. This is > true even if the message number was previously returned by LISTGROUP, > etc. > > In practice, the estimate never errs on the low side, but does err on the > high side occasionally because it may or may not take into account all > cancels that have occurred in the group. I don't see a lot of use in > requiring a guarantee that the number be accurate at the time of the > GROUP command when it may become inaccurate due to the arrival of a > cancel message an instant later. The cancel problem is the simple example, but the real world is a lot more complex. Articles can expire from the group at any time and they can expire out of order. It's even common for this to happen when articles are cross-posted to groups with different expire times. Because of this, a distributed server would have to signal every expire to every front-end server and the front end server would have to accuratly track every expire. This could be done, but is far more expensive than is justified for a number which really isn't important. But, when dealing with hardware errors, like articles lost due to disk, or server, or software, or operator errors, the amount of processing which would be required to even attempt to accurately count the number of aricles in a group with 10 million articles is just totaly unreasonable. It's the level of complexity you put in to financial database but wouldn't dream of wasting your money to make it work for a Usenet server. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Curt Welch
Date: Wed, 20 Apr 2005 02:52
Date: Wed, 20 Apr 2005 02:52
33 lines
2988 bytes
2988 bytes
Mark Crispin <MRC@CAC.Washington.EDU> wrote: > On Mon, 18 Apr 2005, Russ Allbery wrote: > > No, I'm allowing articles to be withdrawn, which is the entire reason > > why this is an estimate and not an exact number. > > That isn't what I've seen. I've seen "estimates" that bear no > relationship to the number of articles at any time. I could belive it. Though I've never seen it. If the server can't make a good estimate, it should just be returning high-low+1 > > In practice, the estimate never errs on the low side, but does err on > > the high side occasionally because it may or may not take into account > > all cancels that have occurred in the group. > > I'm not sure, but I think that I have seen low-side estimates. After > some number of iterations, I ended up completely ignoring that value as > being worse than useless. Well, in practice, because the number can never be correct for the next NNTP command issued, it's of viraully no use to any client even if it were correct. It's something that never should have been included in the first place but which is too hard to remove at this point. I could see an argument for replacing "estimate" with more words to say things such as "good estimate which should try to error on the high side and just be high-low+1 if there is no way to accurately count or estimate the number of articles". But I think the NNTP draft is way past the point of being able to make these types of changes now from what I understand. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Russ Allbery
Date: Wed, 20 Apr 2005 02:55
Date: Wed, 20 Apr 2005 02:55
18 lines
2289 bytes
2289 bytes
Curt Welch <curt@kcwc.com> writes:
> Well, in practice, because the number can never be correct for the next
> NNTP command issued, it's of viraully no use to any client even if it
> were correct. It's something that never should have been included in the
> first place but which is too hard to remove at this point.
The estimate is useful for pretty much only one thing, and that's for
giving the user of a news reader an estimate of how many messages there
are in a group, something that's occasionally of interest (when adding a
new group, for example). It is, of course, only useful even for that if
the estimate is generally more accurate than high - low + 1.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [NNTP] LISTGROUP
Author: Francois Petillon
Date: Wed, 20 Apr 2005 08:42
Date: Wed, 20 Apr 2005 08:42
22 lines
2034 bytes
2034 bytes
On Wed, 20 Apr 2005 02:08:13 +0000, Curt Welch wrote:
> I assume the behavior is just a side effect and not something done on
> purpose. There's no reason to make 100-85 be read as 100- is there?
It depends on the test you do (pseudo-code) :
xover(group, low, high) {
if (low<group.low) low=group.low;
low--;
do
low++;
xover(group, low);
until ((low==high) and (low<group.high))
}
But I agree it is not the right way... :-)
> diablo seems to work like mine and treat it as the empty set.
Yes, stupid ranges are tested and they return an empty set (just before
readjusting low/high values).
François
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 17:43
Date: Wed, 20 Apr 2005 17:43
38 lines
2603 bytes
2603 bytes
Francois Petillon <fanch@fanfan.staff.proxad.net> wrote:
> On Wed, 20 Apr 2005 02:08:13 +0000, Curt Welch wrote:
> > I assume the behavior is just a side effect and not something done on
> > purpose. There's no reason to make 100-85 be read as 100- is there?
>
> It depends on the test you do (pseudo-code) :
> xover(group, low, high) {
> if (low<group.low) low=group.low;
> low--;
> do
> low++;
> xover(group, low);
> until ((low==high) and (low<group.high))
> }
>
> But I agree it is not the right way... :-)
I'm guessing INN didn't turn 100-85 into 100- because they did an absolute
test for matching the high value. My guess is that they have a range
parser which considers the second value invalid since it was too low and
treates it like it doesn't exist.
Dealing with the values being out of range for the group can create bogus
behavior if you adjust both the high and low values as well. I even have a
vague memory of writing it the wrong way once and then noticing the problem
and fixing it. It's easy to get wrong, but getting it right is simple as
well:
n = low
if (n < group.low)
n = group.low
while (n <= high && n <= group.high)
xover(group, n++)
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Russ Allbery
Date: Wed, 20 Apr 2005 18:14
Date: Wed, 20 Apr 2005 18:14
25 lines
2216 bytes
2216 bytes
Curt Welch <curt@kcwc.com> writes:
> I'm guessing INN didn't turn 100-85 into 100- because they did an
> absolute test for matching the high value. My guess is that they have a
> range parser which considers the second value invalid since it was too
> low and treates it like it doesn't exist.
/* Parse range. */
*p++ = '\0';
rp->Low = atol(av[1]);
if (*p == '\0' || (rp->High = atol(p)) < rp->Low)
/* "XHDR 234-0 header" gives everything to the end. */
rp->High = ARThigh;
else if (rp->High > ARThigh)
rp->High = ARThigh;
if (rp->Low < ARTlow)
rp->Low = ARTlow;
p--;
*p = '-';
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [NNTP] LISTGROUP
Author: Curt Welch
Date: Wed, 20 Apr 2005 22:10
Date: Wed, 20 Apr 2005 22:10
35 lines
2772 bytes
2772 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > > > I'm guessing INN didn't turn 100-85 into 100- because they did an > > absolute test for matching the high value. My guess is that they have > > a range parser which considers the second value invalid since it was > > too low and treates it like it doesn't exist. > > /* Parse range. */ > *p++ = '\0'; > rp->Low = atol(av[1]); > if (*p == '\0' || (rp->High = atol(p)) < rp->Low) > /* "XHDR 234-0 header" gives everything to the end. */ That comment sheds some light on how this probably came to be. The idea of using 0 as a special value to mean "the end" might have been thought up before the idea of using a missing second number. And they just choose to code it so all the h<l cases were the same as the 0 case. This is the first time I've ever seen the idea that a 0 value means "the end". It's certainly consistent with the behavior of routines like atol(). I wonder if this convention comes from further back in the history of NNTP or if other servers special case a value of 0 to work that way? > rp->High = ARThigh; > else if (rp->High > ARThigh) > rp->High = ARThigh; > if (rp->Low < ARTlow) > rp->Low = ARTlow; > p--; > *p = '-'; -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: [NNTP] LISTGROUP
Author: Bill Cole
Date: Sat, 23 Apr 2005 14:16
Date: Sat, 23 Apr 2005 14:16
25 lines
2384 bytes
2384 bytes
In article <20050419214133.443$SX@newsreader.com>, curt@kcwc.com (Curt Welch) wrote: > Mark Crispin <MRC@CAC.Washington.EDU> wrote: > > On Mon, 18 Apr 2005, Russ Allbery wrote: > > > So... I've tried to explain a few times that NNTP does not use the 400 > > > and 500 conventions of other protocols like SMTP. NNTP can't be > > > abusing something that it never followed and never even tried to follow > > > in the first place. Are you not agreeing with my point, not > > > understanding it, not remembering it...? > > > > I understood you the first time. I disagree with the perpetuation of an > > arbitrary divergence from standard Internet protocol architecture which > > was clearly created by mistake rather than conscious decision. > > > > The issue isn't that NNTP has its own schema of response code; the issue > > is that NNTP has its own schema that overlaps a well-established scheme. > > And what problems does that cause in the real world? It generates pointless pedantic debates over an unsolvable non-problem any time anyone opens the discussion of NNTP standardization. -- Now where did I hide that website...
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Clive D. W. Feather
Date: Mon, 25 Apr 2005 14:10
Date: Mon, 25 Apr 2005 14:10
20 lines
2644 bytes
2644 bytes
In article <20050419225259.813$WA@newsreader.com>, Curt Welch <curt@kcwc.com> writes >> I'm not sure, but I think that I have seen low-side estimates. After >> some number of iterations, I ended up completely ignoring that value as >> being worse than useless. [...] >I could see an argument for replacing "estimate" with more words to say >things such as "good estimate which should try to error on the high side >and just be high-low+1 if there is no way to accurately count or estimate >the number of articles". The NNTP spec requires the "estimate" to be AT LEAST the actual number of articles and AT MOST high-low+1, with the former being preferable. There are no plans to change this. -- Clive D.W. Feather | Home: <clive@davros.org> Tel: +44 20 8495 6138 (work) | Web: <http://www.davros.org> Fax: +44 870 051 9937 | Work: <clive@demon.net> Please reply to the Reply-To address, which is: <clive@davros.org>
Re: [NNTP] LISTGROUP plus a fix for range descriptions
Author: Curt Welch
Date: Mon, 25 Apr 2005 17:09
Date: Mon, 25 Apr 2005 17:09
21 lines
2502 bytes
2502 bytes
"Clive D.W. Feather" <clive@davros.org> wrote: > In article <20050419225259.813$WA@newsreader.com>, Curt Welch > <curt@kcwc.com> writes > >> I'm not sure, but I think that I have seen low-side estimates. After > >> some number of iterations, I ended up completely ignoring that value > >> as being worse than useless. > [...] > >I could see an argument for replacing "estimate" with more words to say > >things such as "good estimate which should try to error on the high side > >and just be high-low+1 if there is no way to accurately count or > >estimate the number of articles". > > The NNTP spec requires the "estimate" to be AT LEAST the actual number > of articles and AT MOST high-low+1, with the former being preferable. > There are no plans to change this. That works for me. I didn't know that wording was in the current spec. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
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