🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #68762

Re: New NNTP standard in Working Group Last Call

#68762
From: Curt Welch
Date: Mon, 22 Mar 2004 23:39
154 lines
8614 bytes
"Clive D.W. Feather" <clive@davros.org> wrote:
> In article <20040320010803.826$XN@newsreader.com>, Curt Welch
> <curt@kcwc.com> writes
> >I don't mind the above wording, but I don't like it.  If I had a vote,
> >I'd vote against alowing the MAY clause to be added.
>
> Why?

Well, I thought I had explained why in my message.

> The current wording says, in essence:
> - MUST return article number if the request was by number (including
>    "current article"), when it is trivial;
> - MAY return article number if the request was by message-ID;
> - MUST return 0 if it can't or doesn't want to return a number in the
>    latter case.
>
> >I would really like to
> >see a lot of these little difference between servers removed.  If the
> >new stanard "breaks" dnews, then so be it.  The new standard in fact is
> >going to break almost all current servers in one minor way or another
> >like this.
>
> This particular item isn't going to break any servers.

If you put a MAY clause in then nothing breaks.  If you leave it out, then
any serevr not returning 0 is broken.

> >If all the servers don't do the same thing, then news reader authors
> >can't use the paramater.
>
> Not so: if the parameter is not there, *then* you fall back to a slower
> or less reliable approach.

If the paramater is not there the server is broken and many clients would
get a parse error on the line.

If the value of the paramater is 0, it is there.  I think this is the
difference between how you and I are looking at it.  You see a 0 value as
meaning "information not available".  I don't see it that way.  I see it as
meaning "lookup was by Message-ID".  If the server returns a value that
says "lookup was not by Message-ID" when in fact it should have returned
"lookup was by Messaeg-ID" the server has broken the standard.  It's
returned the wrong value.

> >If some servers return 0, then you can't write a
> >newsreader that assums the article number from the current group will be
> >there.
>
> True, but we've already decided that it's not practical for some servers
> to return the number.
>
> >If some return the article number, then newsreaders can't assume
> >that a 0 is there to flag the fact that the lookup was by Message-id.
>
> I don't see this as an issue.

I know you don't.  That's why you don't get the point I was making.

> The client will (modulo pipelining) have
> just made the request, so it should know which form of request it made!
> I really don't see this as a problem that needs solving.

You miss the problem I was trying to present.

News servers have been returning 0 for Message-ID lookup for 16 years.  In
that time, some client might have been written to make use of that fact.
If you change the protocol, you risk breaking clients that are using the
information.

Sure, it's trivial for a client to know what type of lookup it just did,
and to use that instead of using the return value.  But if it was written
with the assumption that the value is always 0 for a Message-ID lookup, the
client won't work on servers that sometimes return a non-zero article
number.

My argument is purely one of aesthetics.  It's bad protocol design to allow
_any_ conditional behavior.  It increases the probability that bugs will
exist in the code that tend to crop up at unexpected times.

For example, code could be written which reads the return value, and uses
the fact that a 0 for the article number means the lookup was done by
Message-ID and the data could be sent to a different routine to processes
the Message-ID fetch vs the article number fetch.  This could would work
fine on a server which always returns 0.  It might also work fine on
servers like dnews because just by chance, all Message-ID lookups were
always done before a GROUP was selected.  So the code was writen and tested
on many servers and it works great.

Much later, someone modifies the client, and this new feature they add
causes the client to sometimes select a GROUP before some of the Message-ID
lookups.  They test the new functions on multiple servers and it all works
great.  And it gets a lot of testing on a server which always returns 0,
and that works great.  But them, the software is shipped, and someone uses
it on a dnews-like server, and they find that sometimes, the code does
strange things.

The fact that the article number is _sometimes_ returned based on what
GROUP is selected is bad design to begin with.  The fact that some servers
MAY do it while others don't have to, makes the design even worse.

> >It
> >becomes almost total worthless and even worse, a potential "bug trap"
> >for news client authors that might make the false assumtion that it will
> >be 0 for all Message-Id look-ups (if they are doing their development on
> >an INN-like server), or that it might always return the article number
> >(if they are doing their development on dnews-like servers).
>
> Then they need to RTFM.

Of course.  But if you keep the protocol design simple, they can remeber it
after one reading instead of having to have a printed reference copy on
hand all the time. :)

> >Adding the "MAY return the article number" just allows current "broken"
> >servers to continue to exist which makes the return value continue to be
> >mostly worthless.
>
> I disagree; I think this last change has added benefit for no cost.

Well then, you miss the point I'm making about the true cost of bad
protocol design then.

If no clients have ever been written, and if no programmer ever makes the
mistake of thinking it will always be 0 for a Message-ID lookup, then the
true cost is 0.  But any protocol feature that "sometimes works" has a
value near 0 as well.  If the number is not always returned, then few
clients, if any, will be able to make use of it.  If the client needs to
know the article number, it will have to use some other system to find it.

The original protocol design, where the number 0 was _always_ returned is a
far better design.  By allowing servers to somtimes return 0, and sometimes
return an article number, you have made the return value almost useless.

It's like the design for a power light which which is red to show the
machine is in standby, and green to show the machine is on, and off to show
the machine is off, but then you change the design to say that the light
MAY be red when the machine is off.  You have made the light useless for
telling when the machine is off, just like you have made the return value
useless for telling when the look-up was done by Message-ID.

We do not have enough facts to determine the true value or the true cost,
so we can not prove which is, or would be, better.

But, I think we both agree that the true cost and true value of doing it
either way is insignificant enough as to not be important.  If you feel
it's better with the MAY, cluase, so be it.  I'm happy with that.  If you
still don't understand why I think it's better without it (and want to),
I'm happy to keep writing. :)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20040322183956.727$4f@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!news.glorb.com!wn13feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!gnilink.net!cyclone.rdc-nyc.rr.com!news3.optonline.net!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <871xo3w5c6.fsf@windlord.stanford.edu> <xn0dfommipc6fs004@news.clara.net> <87u10t4qie.fsf@windlord.stanford.edu> <I$l12xM0$xVAFwh5@romana.davros.org> <xn0dfuqs22sge9002@news.clara.net> <mAMOpTEeZsWAFwu3@romana.davros.org> <20040320010803.826$XN@newsreader.com> <IeilOcJikxXAFwT8@romana.davros.org>

Show Full Headers
Complete Article Headers
Message-ID: <20040322183956.727$4f@newsreader.com>
Subject: Re: New NNTP standard in Working Group Last Call
Date: Mon, 22 Mar 2004 23:39:56 +0000
From: curt@kcwc.com (Curt Welch)
References: <871xo3w5c6.fsf@windlord.stanford.edu> <xn0dfommipc6fs004@news.clara.net> <87u10t4qie.fsf@windlord.stanford.edu> <I$l12xM0$xVAFwh5@romana.davros.org> <xn0dfuqs22sge9002@news.clara.net> <mAMOpTEeZsWAFwu3@romana.davros.org> <20040320010803.826$XN@newsreader.com> <IeilOcJikxXAFwT8@romana.davros.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!news.glorb.com!wn13feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!gnilink.net!cyclone.rdc-nyc.rr.com!news3.optonline.net!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 4p+,6gAXJWmlrj4cssUG@neThnCl+BG+FtJ6ZXZ8Kp+q+d5jb
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 153