NNTP Inter-Server Communication Process: News Article Propagation
(Page 4 of 4)
Improving Push Propagation Efficiency With Streaming Mode
Due to the inefficiency problem just described, one of the more important NNTP extensions is streaming mode, which changes how news pushing is done. When this mode is enabled, the client machine uses the CHECK command instead of IHAVE to ask the server if it wants a particular message. The server responds back as for IHAVE to indicate if it wants the message; if it does, the client sends the message with the TAKETHIS command.
The benefit of CHECK/TAKETHIS is that the client does not have to wait for a reply to CHECK before sending the next command. While the client is waiting for a reply to the first CHECK command, it can do something else, like sending the next CHECK command, allowing commands to be streamed for greater efficiency. So the client could send a CHECK command for the first new message, then a CHECK for the second while waiting for a reply from the server to the first one. Many CHECK commands could be sent in a stream and then TAKETHIS commands sent for each reply received to CHECKs sent earlier indicating that the message was wanted by the server.
The pull model is implemented using the NEWNEWS and ARTICLE commands. The client connects to the server and sends the NEWNEWS command with a date specifying the date and time that it last checked for new messages. The server responds with a set of message IDs for new articles that have arrived since that date. The client then requests each new message using the ARTICLE command.
Note that the push and pull models can be combined in a single session. A client can connect to a server, use NEWNEWS to check for new messages on that server, and then IHAVE or CHECK to inform the server about new messages the client wants to send. In practice, it is more common for only one or the other of the models to be used between a pair of servers on any given exchange.
In addition to propagating new messages, NNTP is also used to allow servers to communicate information about new newsgroups that have been created. This is done using the NEWGROUPS command, which is specified with a date and time like NEWNEWS. In response, the server sends to the client a list of new newsgroups that have been created since the specified date/time.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.