🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79341

Re: Questions about MODE

#79341
From: Curt Welch
Date: Mon, 25 Aug 2008 04:26
52 lines
4200 bytes
=?ISO-8859-15?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid> wrote:
> Hi,
>
> I wonder why there is only "MODE READER" and not a "MODE" command.

It's just historic.  MODE READER was a kludge added in INN to support the
way INN works.  It's a stupid concept which never should have been added as
part of the protocol because it's totally implementation dependent.  Such
implementation details should never have been exposed so blatantly in the
protocol.  It was added simply because it was useful for INN based on INN's
architecture.  I haven't seen another news server that needed it or used
it. (though anyone copying the INN architecture could make use of it for
the same reason INN uses it).

INN used it because of its peculiar architecture.  The main daemon handles
all connections, and handles transit commands, but not reader commands.
Based on configuration files, connections that seemed to be transit
connections (connections from peers normally identified by IP address) were
handled in the main daemon which only supported transit commands.  But if
the connection didn't seem to be a peer, a different program was started to
deal with the connection which supported the normal reader commands.  "MODE
READER" was added simply to force innd to fork the reader program when you
connected to the server from IP that was also used for transit.  Since
there was no way to "go back" (return the connection back to the main
daemon), it made no sense to implement a "MODE TRANSIT".

No one else has implemented MODE TRANSIT because there is no need to add
such a mode to the NNTP protocol.  Servers like mine that implemented all
NNTP commands in a single program could easily enable and disable different
sets of NNTP commands to implement a MODE TRANSIT command, but there's no
point to it.  Based on config file and authentication, the various commands
either work, or don't work for a connection (READER and TRANSIT).  On my
server MODE READER is implemented as a no-op.  It does nothing because
whether the reader commands work for a connection has nothing to do with
what is asked for.  By default, all the reader commands worked for transit
connections which made it easy for my peers to check my spools from their
transit machines if they wanted to.

> Because "MODE TRANSIT" could have also been specified (why not be
> symmetric?).

It was a bad command with odd side effects on INN (loss of data in the TCP
connection).  If not for the fact that it's a De Facto standard because of
INN, it should have simply been removed from the protocol.  It would be
worse to amplify the mistake by adding a MODE TRANSIT command even if it
created a nice symmetry.  NNTP has too many modes already.  The MODE STREAM
command is yet another historic mistake.  It was never needed and should
never have been added.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20080825002649.352$qC@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.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr2.newsreader.com.POSTED!not-for-mail
References: <g8ovaf$155$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <20080825002649.352$qC@newsreader.com>
Subject: Re: Questions about MODE
Date: Mon, 25 Aug 2008 04:26:45 +0000
From: curt@kcwc.com (Curt Welch)
References: <g8ovaf$155$1@news.trigofacile.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.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr2.newsreader.com.POSTED!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-NRC-Trace: NewsReader.Com oHYm0hpvvhvwxOqwNBSd2F67MvxGxyN2yEuxETSkStvdF=
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: 52
NNTP-Posting-Host: 0d952309.nr2.newsreader.com
X-Trace: DXC=J7JZRBDc:3H_0m8FUC;
 IjDOA8_@f\K_iBiZXZgEEf?mNe_`D[j08<J@Nd7biGRhQTGYA@MLbHKH8M]X9SO9`PLRA
X-Complaints-To: abuse@newsreader.com