🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #14819

Re: What is the format of a streaming feed?

#14819
From: Matt Dillon
Date: Thu, 06 Feb 1997 00:00
100 lines
3885 bytes
:In article <x6bu9xjv1v.fsf@mustang.via.net>,
:Joe McGuckin <joe@mustang.via.net> wrote:
:>
:>Are all messages just blasted across the link? Is the receiving end
:>expected to ignore messages that it has already seen?
:>
:>Joe
:>

    The basic problem with ihave is that the client has to wait for
    the server to respond before it can continue.. because if the
    server responds with a don't want it type code, the client
    is not supposed to send the article, but if the server responds
    with a success code, the client IS supposed to send the article.
    The client can't do anything until it knows what the server
    expects it to do.

    To do streaming, the server must support 'mode stream'.  Once 
    you are in streaming mode, you can use 'check' and 'takethis'
    commands.

    The key difference is that the server does not expect you to
    push the article to it when you send the check command, and
    always expects an article to follow a takethis command,
    even if the article would otherwise fail.  For a check
    command, the server simply indicates whether it wants the message-id 
    or not.  This allows you to send several (many!) check commands all at
    once without having to wait for the server to respond to
    the first one.  You can then collect the responses all
    at once and send takethis commands for the articles the server
    does not have.

    Once you know what message-id's the server is willing to
    accept, you can send a 'takethis' command followed by
    the article for each article the server said it didn't have.

    In theory, you actually run two separate processes... 
    one that sends the check and takethis commands,
    and a separate process to handle the responses
    and notify the first process of what articles
    to send.  In actuality, most feeder programs
    just run multiple commands in blocks, which has
    almost the same effect.

    You can also skip the check commands and just run
    takethis commands... many feeders do this if they
    determine that the server is taking most of the 
    offered articles.  This wastes bandwidth, though,
    and banwidth is often more expensive then cpu cycles.

    client			server (usualy response.. not a complete
				list)
    -----			-----

    mode stream
				203 		(server supports streaming)
				anythingelse	(server does not support it)

    check <message-id>		
				238 <message-id>	(server wants it)
				438 <message-id>	(server doesn't want it)

    takethis <message-id>
    ARTICLE HEADERS & BODY, dot-escaped (if a line starts with a dot,
    you have to prepend a second dot).
    .
				239 <message-id>	(server thanks you)
				436 <message-id>	failure, try later
				437 <message-id>	reject, do not retry
				439 <message-id>	reject, do not retry
				5xx			retry later, 
							catastrophic server
							failure (I think).


   Example stream:

   check <id1>
   check <id2>
   check <id3>			238 <id1>
   takethis <id1>		238 <id2>
   ARTICLE1			438 <id3>
   .
   check <id4>			239 <id1>
   takethis <id2>
   ARTICLE2
   .
   check <id5>			438 <id4>
   check <id6>			439 <id2>
   check <id7>			238 <id5>
   etc...			438 <id6>
				438 <id7>
				etc...


					-Matt


Technical Details
Message-ID: <5de1gn$r0f@flea.best.net>
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!not-for-mail
References: <x6bu9xjv1v.fsf@mustang.via.net>

Show Full Headers
Complete Article Headers
Message-ID: <5de1gn$r0f@flea.best.net>
Subject: Re: What is the format of a streaming feed?
Date: Thu, 06 Feb 1997 00:00:00 +0000
From: dillon@flea.best.net (Matt Dillon)
References: <x6bu9xjv1v.fsf@mustang.via.net>
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!not-for-mail
X-Deja-AN: 214981566
Organization: BEST Internet Communications, Inc.
Newsgroups: news.software.nntp