Reliable byte stream

From Computer History Wiki
Revision as of 00:11, 17 November 2018 by Jnc (talk | contribs) (+link, cat)
Jump to: navigation, search

A reliable byte stream is a byte stream in which the bytes which emerge from the communication channel at the recipient are exactly the same, and in the exact same order, as the sender inserted into the channel.

Communication protocols which implement reliable byte streams across a data network, generally over some unreliable lower level, use a number of mechanisms to provide the reliability:

  • All data items are identified with a sequence number, which is used both to make sure that the data is delivered to the entity at the other end in the correct order, and to check for lost data items.
  • The receiver sends back acknowledgements for data items which have been successfully received.
  • A timer at the sender will cause a timeout if an acknowledgement is not received within a reasonable round trip time, and the (presumably lost) data will then be re-transmitted.
  • To check than no data items are damaged, a checksum is used; one is computed at the sender for each block of data before it is sent, and checked at the receiver.

Erroneous or missing data is reported to the sender, in order that it may re-transmit the same. Any duplicated data items are discarded.

The classic example of a reliable byte-stream protocol is the Transmission Control Protocol.