🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #3432

Streaming not-nntp

#3432
From: Ken Herron
Date: Tue, 07 Mar 1995 17:42
114 lines
5593 bytes
[Crossposted to news.future with followups directed there, since this
isn't, strictly speaking, about nntp.]

|) The problem with streaming IHAVE is that what gets sent depends on the
|) server's response.  If it returns 335, you send the article, if it
|) returns anything else, you don't.
|
|  How about an implementation which would open N NNTP connections to the
|remote system (where N was a configuration [file?] option).

A good streaming-nntp extension isn't going to share much at the 
protocol level with the current nntp spec anyway, so my inclination 
would be to dump NNTP altogether and just design a new protocol.  I 
have some partially-baked ideas on the subject (which I have about a
zero percent chance of actually implementing).  The design goals are
basically:

	1)	Allow maximal use of bandwidth
	2)	Allow data compression
	3)	Make the protocol low-overhead
	4)	Minimize the number of articles that are dropped by the 
		receiver
	5)	Don't demand lots of effort (eg, installing & maintaining 
		a dynafeed server) or lots of administrator's time 
		(editing 50-line feed-control entries) to to implement #4

I evision this as a packet-based protocol, with field lengths, numbers
transmitted in binary, etc., so things like <IHAVE> would actually be
some sort of code.  I suspect that small, selective feeds with slow
links and underpowered hardware are the wave of the future, so making
the protocol compact and easy to parse is more important than being able 
to test a server by telnetting to it.  Besides, the DOS world won't
embrace it unless it transmits binary data :-)

This description is deliberately vague, but I don't think I've 
hand-waved away anything difficult.  I've actually worked out quite a
bit more detail than I'm presenting here, none of it is especially
clever.

1)	Sender (S) opens control connection to receiver (R), they do 
	authentication, option negotiation, etc.  
	
2)	S opens data connection to R.  The exact nature of this would be
	negotiated at startup, much like ftp negotiates data connections
	for each transfer.

3)	S begins streaming data packets of the form:

		<IHAVE><cookie><message ID><other data>
	
	on the control connection.  <cookie> is a (short, like 2-4 
	bytes) unique identifier.  "other data" could be the size of 
	the article, the newsgroup list, distribution--heck, even the 
	path header--anything that R might want to use to decide whether 
	it wants the article or not.  The exact contents of this section 
	would be negotiated at startup.

4)	R asynchronously streams packets of the form:

		<SENDME><cookie>

	on the control connection.

5)	S asynchronously streams article data on the data connection to
	fulfill these SENDME requests.  [It'd need a way to indicate
	"oops, I can't send you that article after all", too.]

6)	S occasionally sends a data packet of the form:

		<SYNC>

	on the control connection, meaning "I'm about to invalidate
	all of the <cookie>s I've sent so far", and flushes the data
	connection.  S can then wait for a reply from R, or it can 
	start sending <IHAVE>s with recycled <cookie>s.  It continues
	to answer <SENDME>s from the to-be-invalidated <cookie> jar
	until it receives a response to this <SYNC>, after which it
	may dump the old <cookie>s and serve <SENDME>s from the new
	one.

7)	R replies to a <SYNC> packet once it has everything it wanted
	from the set of <cookie>s that is being invalidated.

8)	Eventually, S can follow a <SYNC> with a 

		<BYE>

	packet.  Once R responds to the <SYNC>, the connections are
	closed.

Notes:

The data connection could trivially be piped through a stream compressor
like gzip.  This is more efficient than compressing each article as a
separate entity.

Sending information besides just the message ID as part of the IHAVE can 
be amazingly useful.  The receiver can elect on an ad hoc basis to 
reject unwanted distributions, articles that are too large for it to 
handle, articles in groups it doesn't want to carry, articles from 
cyber.sell.com :-), etc.  This is more control than a pull-style feed 
can give, short of XOVERing and HEADing each potential article on the 
server.

Except in extreme cases, the sender will always be sending something.
As an alternative to SLIP or PPP, one could implement this on top of a 
straight serial link and enjoy the speed advantage of compressed UUCP 
batches without the overhead of queuing them, and with more selectivity
than batch-style ihave/sendme yields.

So there it is.  I know it's considered bad form to throw out proposals
without being ready to implement them, but I'm curious what comments
people might have.  And if someone wants to run with this, hey, feel free.
Technical Details
Message-ID: <3ji5tk$2fv@service1.uky.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.future.mbox.zip!bga.com!news.sprintlink.net!howland.reston.ans.net!lamarck.sura.net!news.uky.edu!kherron
References: <3jeg2d$kp0@panix3.panix.com> <4jKqMka00WBw0gVslO@andrew.cmu.edu> <1995Mar7.030855.1@spcvxb.spc.edu>

Show Full Headers
Complete Article Headers
Message-ID: <3ji5tk$2fv@service1.uky.edu>
Subject: Streaming not-nntp
Date: Tue, 07 Mar 1995 17:42:12 +0000
From: kherron@f10.facts.uky.edu (Ken Herron)
References: <3jeg2d$kp0@panix3.panix.com> <4jKqMka00WBw0gVslO@andrew.cmu.edu> <1995Mar7.030855.1@spcvxb.spc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.future.mbox.zip!bga.com!news.sprintlink.net!howland.reston.ans.net!lamarck.sura.net!news.uky.edu!kherron
Newsgroups: news.software.nntp,news.future
Followup-To: news.future
Organization: University of Kentucky Computing Center
Lines: 113
Distribution: inet
NNTP-Posting-Host: f10.facts.uky.edu