Article View: news.software.nntp
Article #44714Re: Batched ARTICLE commands
From: Bill Cole
Date: Thu, 02 Mar 2000 00:00
Date: Thu, 02 Mar 2000 00:00
105 lines
6068 bytes
6068 bytes
In article <89hm53$bd1$1@newssvr02.news.prodigy.com>, davidsen@tmr.com (bill davidsen) wrote: > > In article <bill-2602001125570001@192.168.254.8>, > Bill Cole <bill@scconsult.com> wrote: > | In article <250220002137494912%planb@newsreaders.com>, "J. Moreno" > | <planb@newsreaders.com> wrote: > > | > Pipelining article commands results in a significant speed boost over > | > doing things in sequence. This isn't of much concern to an online > | > newsreader, but an offline newsreader will certainly want to take > | > advantage of it, so documenting it explicitly would, IMO, be a good > | > thing. > > If there is a significant improvement, the server is serious sick. The > client software should be able to wait for a response and issue the next > article request immediately. No. Think network latency. Think about the time it takes for a server to assemble a response. Consider that CHECK/TAKETHIS exists for the same reasons that batching ARTICLE/HEAD/XOVER/XHDR is useful. If a client pushes a series of commands on the session it can then sit back and wait for the responses. The server can also (if written well) prep all the responses and queue them so that there is ZERO pause between them. It is quite possible to be fetching an article from disk while sending the previously requested article over the wire, but ONLY if the command to do that fetch has been pushed along before the client has received the previous response. The server will not be sending any data for the RTT plus the response prep time if the client sticks to a pure request/response model. [...] > | Curt is also right about the coding side: making a server that doesn't > | pipeline means making a server that is more complex than it needs to be > | from a coding perspective. The natural way to handle a protocol like NNTP > | is to read every byte coming in and parse out commands, NOT to rely on > | specific timing which is difficult (impossible on some OS's) to get > | exactly right. I would be very surprised to find any server failing to > | handle appropriately batched commands which is not otherwise broken in > | some way. > > Could you give an example of an operating system which doesn't support > a client server model which allows a client to send a request to the > server and for the server to return a response? I don't see any > "specific timing" involved, unless you mean that the request should come > before the reply. It's easier to code that way ;-) I was speaking of the SERVER behavior. I'm pretty sure Curt was too. The problem is not in failing to allow a pure request/response model, but in attempting to enforce that model: it's hopelessly complex. The server has no way of determining when the client has seen all of a response, so it has no way of telling when a new command is 'legal' if pipelining is 'illegal' and in fact on some OS's (I was thinking specifically of MacOS where I've done some server coding, but I suspect many others as well such as Solaris or anything using STREAMS or similar layered abstractions for transport) it has no way to even know when a response has actually hit the wire. If there's no transparency to TCP ACK's, the server cannot know when a client has seen the last of a response and so could 'legally' send a new command. Even if it could, there's no way for the server to know that an app has actually read all the data from that stream, so any attempt by a server to enforce 'no streaming of commands' is hopeless in a protocol without an application-level ACK to responses. Failure to handle batched commands is an artifact of how servers are structured, usually (always?) a result of a state change that hands off a connection to a new process. THAT is understandable, and I think it is unwise for the spec to demand that a client can do something like this without waiting for responses: AUTHINFO USER me AUTHINFO PASS secretstuff GROUP news.software.nntp HOWEVER, a server that FAILS to handle a stream of batched ARTICLE, XOVER, HEAD, XHDR, or similar commands which do not evoke a state change in success or failure is problematic. The failures in INN are not much of an issue IMHO because a client that would try to batch the problem commands is a stupidly written client, however INN can't reliably drop commands batched that way (at least not in theory. I have not tested much) . The whole argument devolves into some silliness: no server not otherwise badly broken fails to work with batched commands that make sense to batch. If there is anything in the spec about this, I think it should define batching that a server MUST support and that servers MAY allow other batching with the warning that clients MUST wait for a response to any command if the following command presumes a specific sort of success of the command. I can even see batching GROUP commands in a common newsreading model (used for many GUI newsreaders) because typically there is a stream of GROUP commands sent just to get the current article counts for subscribed groups. -- Bill Cole, Geek at large I'm casually looking for a new job See: http://sc1.scconsult.com/~bill/resume.html for a resume and more 5094th at Freenix!!!
Technical Details
Message-ID:
<bill-0203002213340001@192.168.254.8>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-mailReferences:
<220220000104304154%planb@newsreaders.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <250220002137494912%planb@newsreaders.com> <bill-2602001125570001@192.168.254.8> <89hm53$bd1$1@newssvr02.news.prodigy.com>Show Full Headers
Complete Article Headers
Message-ID: <bill-0203002213340001@192.168.254.8> Subject: Re: Batched ARTICLE commands Date: Thu, 02 Mar 2000 00:00:00 +0000 From: bill@scconsult.com (Bill Cole) References: <220220000104304154%planb@newsreaders.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <250220002137494912%planb@newsreaders.com> <bill-2602001125570001@192.168.254.8> <89hm53$bd1$1@newssvr02.news.prodigy.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: 592508194 Sender: bill@scconsult.com Organization: Yeah Right Newsgroups: news.software.nntp X-Posting-Server: RumorMill 1.3d16