Reliable Data Transfer (RDT) – Yathin Latif
When transferring data from one process to another the layers come into play. The application, transport and link layer. You may ask how or why and that will be shown bellow (Chapter 3, Slide3-21):
But in the picture above we can see that it is using a reliable (TCP) connection, in some cases a developer may be using an unreliable link/connection. If the service is unreliable, then there must be certain implementations.
As seen above the rdt_send() i s called by the application layer when the data has to transferred to destination/host the the udt_send() is called to move the packet along the unreliable link/channel. When the packet arrives at the end of the link/channel rdt_rcv() will be called, notifying the transport layer that there is data here and it may call the deliver_data() to for the rdt protocol to deliver the data to the application layer.
But this only shows unidirectional data, in real world implementations it is bidirectional, meaning data will flow be sent and received from both sides.
RDT 1.0 (reliable transfer over a reliable channel):
Since the channel is reliable then there will likely be no bit errors or packet loss. The sender FSM will send the data to the underlying channel/link and the receiver FSM will receive/read the data from the underlying channel/link.
RDT 2.0 (channel has bit errors):
The underlying channel may flip bits in the packet being sent.
How to recover from errors? (by doing sending the following)
ACK’s => receiver tells the sender that the packet was received.
NAK’s => receiver tells sender that the packet had errors