Clive D.W. Feather
clive at demon.net
Wed Mar 21 04:40:17 PST 2001
Proposed new words for streaming (aka pipelining).
NNTP is designed to operate over a reliable bi-directional connection
such as TCP. Therefore, if a command does not depend on the response
to the previous one, it should not matter if it is sent before that
response is received. Doing this is called "streaming". However,
certain server implementations throw away all text received from the
client following certain commands before sending their response. If
this happens, streaming will be affected because one or more commands
will have been ignored or misintepreted, and the client will be
matching the wrong responses to each command.
Since there are significant benefits to streaming, but also
circumstances where it is reasonable or common for servers to behave in
the above manner, this document puts certain requirements on both
clients and servers.
Except where stated otherwise, a client MAY use streaming. That is,
it may send a command before receiving the response for the previous
command. The server MUST allow streaming and MUST NOT throw away any
text received after a command.
[Start of alternative 1; commands listed are suggestions]
The following commands MUST end any stream of commands. That is, the
client MUST NOT send any following command until receiving the CRLF
at the end of the response from the command. The server MAY ignore
any data received after the command and before the CRLF at the end of
the response is sent to the client.
[Start of alternative 2]
If the specific description of a command describes it as "not
streamable", that command MUST end any stream of commands. That is,
the client MUST NOT send any following command until receiving the
CRLF at the end of the response from the command. The server MAY
ignore any data received after the command and before the CRLF at the
end of the response is sent to the client.
The initial connection must not be part of a stream; that is, the
client MUST NOT send any command until receiving the CRLF at the
end of the greeting.
If the client uses blocking system calls to send commands, it MUST
ensure that the amount of text sent in streaming does not cause a
deadlock between transmission and reception. The amount of text
involved will depend on window sizes in the transmission layer,
and is typically 4k for TCP.
[Note: I don't see any need for a way to say "this command must not be
streamed after the previous command".]
Clive D.W. Feather | Work: <clive at demon.net> | Tel: +44 20 8371 1138
Internet Expert | Home: <clive at davros.org> | Fax: +44 20 8371 1037
Demon Internet | WWW: http://www.davros.org | DFax: +44 20 8371 4037
Thus plc | | Mobile: +44 7973 377646
More information about the ietf-nntp