RFC 718 UNKNOWN TELNET · IMPLEMENTATION

Comments on RCTE from the Tenex Implementation Experience

Implementation lessons from building the RCTE Telnet option on TENEX, and three problems the protocol left open.

On rfc-editor.org ↗
PUBLISHED
June 1976
AUTHORS
J. Postel
STREAM
Legacy
TENEX VERSION
1.34
PROBLEMS REPORTED
3
DOI
10.17487/RFC0718

RFC text

Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                     Jon Postel  (SRI-ARC)
Request For Comments: 718                                              Jun 1976
NIC #35874



The following memo was a page of a document describing changes in
version 1.34 of the Tenex system. I believe that the author is Ray
Tomlinson or someone else in the BBN-RCC Tenex group. In any case Ray
has agreed that these comments should be circulated to the to the
network community, rather than to only the Tenex community.


         Comments on RCTE from the TENEX Implementation Experience

The code to implement the RCTE option of the new TELNET protocol for
TENEX has been completed. The RCTE option permits a reduction in network
traffic by deferring the transmission of characters which will not cause
the receiving user program to be activated until a character which will
cause the user program to be activated. A further reduction is achieved
by minimizing the flow of echo characters back to the user TELNET
program. This is done by having the server instruct the user TELNET to
echo the group of characters up through the next wakeup character. By
sending this command as the user program is about to read the first
character of that group, the echo is guaranteed to follow any response
to the preceding group of characters.

Significant problems with the RCTE protocol were encountered. The
handling of spontaneous output was specified in a way that made the
implementation extremely difficult to do correctly (if, indeed, a
correct implementation is possible). The solution here was to completely
isolate the control of input transmission and echoing from the
characters flowing in the output stream. Synchronization of input and
output then occurs directly by virtue of the embedding of control
information in the output stream. This approach permits a simplified
coding of both the user TELNET and server TELNET.

A second problem was the handling of interrupt characters. The RCTE
protocol fails to provide an explicit mechanism for interrupt characters
thus necessitating the handling of interrupt characters as program
wakeup characters. Since the interrupt characters are not actually
handled as program wakeup characters and, in fact, bypass the terminal
input buffer, a special provision had to be made to get the command sent
back to the user TELNET to indicate that the character stream should be
echoed beyond the point where the interrupt character was typed. The
transmission must be synchronized with the processing of the terminal
input buffer so that it will be sent at the proper time. This was
achieved by putting a marker in the input buffer at the point where the
interrupt character was. This marker is never given to the user's
program and must not be counted as an input character. A new counter was
installed indicating the number of such markers in the input buffer and
the SIBE JSYS modified to indicate "empty" only if the difference of the
total characters in the buffer and the number of markers in the buffer
is greater than 0.

                                   -1-

A third problem is handling the case where the input buffer is cleared.
Since the buffer may contain various wakeup characters and special
markers, when the buffer is cleared, the user TELNET and SERVER may get
out of sync. It is infeasible to scan the buffer and send a RCTE
command for each such wakeup character or special marker. instead, a
command is sent to the user TELNET meaning "clear your input buffer and
reset your counters". This command is implemented by sending "WILL
RCTE". This is the reverse case from a normal RCTE (i.e. DO RCTE) and
thus cannot be confused with the normal use of the RCTE option. This
saves adding a new option.













































                                   -2-

AI ELI5

On this page
PROBLEMThe RCTE Telnet option promised less network traffic by batching typed characters and cutting echo traffic, but the TENEX team found real trouble when they coded it.
MECHANISMThe memo lists three problems (spontaneous output, interrupt characters and cleared input buffers) and how TENEX solved each one.
WHY IT MATTERSIt is a one-page set of implementation notes, not a protocol specification, and it is useful as a record of what went wrong in an early RCTE implementation.

§1What the Memo Is

Jon Postel circulated this page from a document describing changes in version 1.34 of the Tenex system. He believed the author was Ray Tomlinson or someone else in the BBN-RCC Tenex group, and Ray agreed the comments should reach the whole network community, not only Tenex users.

The code for the RCTE option of the new TELNET protocol had been completed for TENEX. The memo reports what the team learned. See RFC 726 for the option itself.

A builder finished a new gadget and wrote down what surprised them, so other builders could learn from it.

§2What RCTE Tries to Save

The RCTE option reduces network traffic in two ways. First, characters that will not wake up the receiving user program are held back until a character that will wake it arrives. Second, echo traffic back to the user TELNET program is minimized.

For the echo saving, the server tells the user TELNET to echo the group of characters up through the next wakeup character. Sending this command as the user program is about to read the first character of that group guarantees the echo follows any response to the preceding group.

Instead of mailing every letter of a word, you wait until the word is done and send it once. The other side also says in advance how much of it to show you.

§3Three Problems Found

Spontaneous output. The way RCTE specified it made a correct implementation extremely difficult. TENEX completely isolated the control of input transmission and echoing from the characters in the output stream. Input and output are synchronized by embedding control information in the output stream, which simplified both the user and server TELNET.

Interrupt characters. RCTE has no explicit mechanism for them, so they have to be handled as wakeup characters, even though they actually bypass the terminal input buffer. TENEX put a marker in the input buffer where the interrupt character was. The marker is never given to the user program and is not counted as an input character, and the SIBE JSYS was changed to report empty only when the buffer total minus the markers is greater than 0.

Cleared input buffer. A cleared buffer may hold wakeup characters and markers, so the user and server could get out of sync, and sending a command for each one is infeasible. Instead the server sends WILL RCTE, meaning clear your input buffer and reset your counters. This is the reverse of a normal DO RCTE, so it cannot be confused with normal use and no new option is needed.

Three things went wrong: surprise messages, urgent interrupts, and a wiped queue. Each got its own simple fix, like a bookmark in the queue and a special reset signal.