Scheme #1:Just transmit the data
Algorithm for sender: Just send the data. Don't worry about overflowing the receiver or transmission errors Algorithm for receiver: Read all the data as fast as you can. Buffer as needed. When does this work: Only if the underlying network handles errors for you, or errors are SO rare you don't care Example: Streaming Media Speed: Best posible |
Scheme #2: Automatic Repeat Request
Algorithm for sender: While there is data to send ... Don't move the pointerAlgorithm for Receiver: RepeatWhen does this work: When Latency is low compared to bandwidth and there are few errors Example: Human conversation Speed: Very bad if latency is high compared to bandwidth or if there are lots of errors |
Scheme #3: Automatic Repeat Request with NAK
Algorithm for sender: Algorithm for Receiver:While there is data to send ... RepeatWhen does this work: When Latency is low compared to bandwidth Example: Human conversation Speed: Very bad if latency is high compared to bandwidth |
Scheme #4: Go Back N
Algorithm for sender: Function SendpacketAlgorithm for Receiver: RepeatWhen does this work: There are few errors Packets are rarely reordered. There is enough RAM to buffer latency * bandwidth amount of data Example: Speed: Fine if there are only a few errors |
Scheme #5: Selective Repeat
Algorithm for sender: Function SendpacketAlgorithm for Receiver: RepeatWhen does this work: Always, if you have time to code it Example: TCP, except that TCP does byte numbers instead of packet numbers Speed: Great |
Scheme #5: Checksum 'till Finished
Algorithm for sender: Function SendpacketAlgorithm for Receiver: RepeatWhen does this work: Always, if you have time to code it and love math Example: None that I know of Speed: Great for long datas and lossy or corrupting networks |