RATP, Check Sequences and Data Compression
RATP Compared to Public Protocols
As can be seen from the above tables, RATP does not represent a significant savings compared to other widely-used protocols.
Given frame lengths of 13 bytes, which appears to be the minimum for Thinwire II (RFC 914), 8 characters' overhead using the public standards represents 61% versus 46% for RATP's 6 characters. On a 1200 baud line, the bandwidth available assuming only such short frames is thus 74 versus 82 characters per second, respectively. Since 1/13 of these are actually user data, the typing rates supported by these protocols using TCP/IP are pretty low, like 5.6 versus 6.3 characters per second. Clearly a bigger cost is still found in the 12 characters overhead in Thinwire II (or 40 for TCP/IP with no compression).
The costs improve dramatically when the number of user characters per frame increases. Thus, file transfer, or even line-blocked typing, should perform adequately. As frame size grows, the cost of the extra 2 characters per frame to use standard protocols rapidly drops to a few percent or less.
RATP does allow one optimization which cannot be achieved in the standard protocols - the use of a one-character format that reduces the per-frame overhead to 3 characters (or 4 if a 16-bit CRC is used). However, in the scenario wherein single-character messages make sense, a user typing characters (with no higher layer protocols), the extra overhead is probably not a problem since the link is still lightly enough loaded that the extra overhead is still a small percentage of the available bandwidth. Also, allowing multiple frames in flight helps reduce the bottleneck caused by having one frame at a time outstanding.
On Check Sequences
Both RFCs 914 and 916 propose to use relatively simple check sequences, which can be easily computed in a general-purpose processor. In one case, this is an additive check and in the other it is an exclusive-or (or parity) check. Although the additive check is slightly more powerful than the exclusive-or, both are relatively weak compared to CRC techniques.
Since the intended network-layer protocol (IP) provides for similar checks on its header, and the transport layer (TCP) checksums its header and data, one might question whether the protection should also be provided at the link layer at all, or if it should, then are these checks good enough? Providing for recovery at the TCP layer leads to slow recovery times, so this approach will probably yield too poor a level of service for noisy links. More importantly, the link layer control field needs a certain degree of protection to prevent needless loss or duplication of frames in the face of line errors.
A CRC check, in combination with the additive checks provided by IP and TCP, yield an error-protection that is greater than that afforded by either check by itself. This is because the two techniques address fundamentally different characteristics of the possible errors. The degree of increase is substantial compared to that of two additive checks. That is, if two additive checks are cascaded, there are many types of two-bit failures that will pass both the link layer and TCP/IP checking.
Although I don't wish to include a detailed error analysis in this note, I would support the use of a CRC type of error check because of the far greater level of protection it affords. As I pointed out, the cost per character is roughly 5-6 instructions, assuming the use of a 256 by 16-bit lookup table. Again, at 120 characters per second, the increased cost is not deemed to be too great.
Moreover, use of a standard CRC allows for the possibility that the serial line chip's own CRC generation and checking hardware may be used. Although such chips may not be present in the PCs in the environment envisioned, they are likely to be available in the gateway machine to which the PCs talk.
Data Compression: An Aside
I find the proposed methods of data compression of RFC 914 particularly interesting. I see these as independent of the choice of the underlying link layer protocol, as it is in RFC 914. I am aware of no such character-oriented compression that is in common use in the communication world. The only techniques that come close are in statistical multiplexing devices, which sometimes also include an adaptive Huffman-coding to reduce link bandwidth. Since the Thinwire II approach can recognize much longer repeated sequences than a Huffman code, I expect that the potential savings are correspondingly greater.
I would like to see a version of the Thinwire protocols which allows for the template idea, but which keeps it independent of the higher layer protocols in use. One way to achieve this is to allow templates to be encoded and exchanged between the communicating parties when they start up, and perhaps adaptively as conditions warrant. I would anticipate that this sort of approach might well have widespread applicability beyond the TCP/IP environment addressed in RFC 914. The most important gain for this environment is removal of the apparent exorbitant overhead that IP and TCP seem to present for use over slow links.