🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44664

Re: Questions on newsfeeds types

#44664
From: Curt Welch
Date: Wed, 01 Mar 2000 00:00
63 lines
3402 bytes
Zach Peine <zach256@my-deja.com> wrote:
> In article <20000229174537.212$3B@newsreader.com>,
>   curt@kcwc.com (Curt Welch) wrote:
>
> > Streaming is when "MODE STREAM", "CHECK" and "TAKETHIS" are used to
> > feed articles instead of IHAVE.  They allow the feeding system to
> > feed articles much faster on a single stream.
> >
> I still need to make sure I have this stream thing.  It's full duplex,
> meaning that both sides transmit at the same time, right?

Right.  That's how TCP/IP works.  Both sides are compleley independent
of each other.

> Am I right
> in thinking that it would require two threads

Just one on the server side can work.  But optimizing performance
of news server is a very OS dependent thing and you might play
all sorts of complex games with multiple threads to do that.

When the server receives a CHECK <messages-id> it does a lookup
in it's history file (a database of past message-id it's already
received), and then respons with a YES I want that new article
or NO I don't back to the client.

When the server recieves a TAKETHIS, an article will always follow,
so you read the article, look at it and figure out if you really
want or not, and then save it.

You just loop doing those two things in a single thread.

> and that it would be most
> efficient to use all the CHECKs together so that the sender would not
> have to wait for replies?

The client will start by sending a bunch of checks (lets just say 5).
It then waits for your responses to start comming back.  YOu have do
do a history lookup for each one, so there may be a short delays as
they come back.

For each NO response, you just cross that article of the todo list.  For
each yes response, you then send the associated article with a TAKETHIS
command.

But at the same time, each time the client gets a response back, it
sends a new CHECK command.  That way, you've always got 5 checks either
in transit or in the server's input queue waiting to be processed.

The whole point of this is just to remove the transmission delays from
the process.  Whenever the server is done doing a check or a takethis,
it doesn't have to wait for the client to send the next thing, it's already
sitting in the TCP/IP input queue waiting for the server to pick it up and
work on it.

Writing the client side of a streaming feed is a lot more complex than
writting the server side.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000229223015.812$63@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!not-for-mail
References: <89hf84$e82$1@nnrp1.deja.com> <20000229174537.212$3B@newsreader.com> <89hr8g$mpk$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
Message-ID: <20000229223015.812$63@newsreader.com>
Subject: Re: Questions on newsfeeds types
Date: Wed, 01 Mar 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <89hf84$e82$1@nnrp1.deja.com> <20000229174537.212$3B@newsreader.com> <89hr8g$mpk$1@nnrp1.deja.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!not-for-mail
X-Deja-AN: 591596840
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-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp