Article View: news.software.nntp
Article #14184NNTP and cancelling a request for an article body
From: Brad Templeton
Date: Sat, 18 Jan 1997 00:00
Date: Sat, 18 Jan 1997 00:00
59 lines
3003 bytes
3003 bytes
Netscape, in creating multithreaded browsing programs, taught us something that wasn't thought of when NNTP was designed. Users, particularly users on slow links, like to abort the fetch of large articles. The bad news is that the only way to do this is just to close the connection to the NNTP server and let it figure out that has a broken socket. This means a lot of connection re-negotiation, and in most servers process start/kill and other inefficiencies. But I think the feature is valuable. Even when not on a modem sometimes. How to support it? I suppose a STOP command could be added and the server could listen for it while sending the article by polling the read socket. Polling is always a pain though. The server could also be multithreaded so that the STOP command causes a new thread to start which then kills the sending thread, ideally by having it append some sort of transfer aborted note. Alternately one could make it faster and more efficient to stop and restart connections to NNTP servers. One way would be to make NNTP stateless, which would make it easier to write the server multithreaded (or even the "pool of N processes" style of some web servers). NNTP could be made stateless as follows: a) The client declares it supports stateless, and after that the ARTICLE, HEAD, BODY etc. commands must not be used, but identical commands which always provide a newsgroup and (if needed) article number are used. b) The client declares it supports stateless, and it gets back a cookie. It prepends the cookie to all future commands. The advantage of (a) is that it's truly stateless. The server keeps no state. It can work in the "pool of N processes" method. It's easy to modify servers to support it. The advantages of (b) are that it's probably easier to modify clients to support it, you can still track sessions for auditing (a big desire of mine) and you don't have to re-authenticate every new connection if it comes with a valid cookie. One could also do (c), namely truly stateless but with a cookie. The cookie would only be used for authentication (though the server could still insist on re-authentication) and for auditing sessions to track readership. This is the most work but it does everything. Comment? -- Brad Templeton, publisher, ClariNet Communications Corp. info@clari.net The net's #1 E-Newspaper (1,400,000 paid sbscrbrs.) http://www.clari.net/brad/
Technical Details
Message-ID:
<5brhhi$62p@fugue.clari.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-mailShow Full Headers
Complete Article Headers
Message-ID: <5brhhi$62p@fugue.clari.net> Subject: NNTP and cancelling a request for an article body Date: Sat, 18 Jan 1997 00:00:00 +0000 From: brad@clari.net (Brad Templeton) 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: 210727143 Organization: ClariNet Communications Corp. Newsgroups: news.software.nntp