The purpose of this section is to sketch the principles and issues related to implementing the unicast communication protocols and relate those principles and issues to the middleware that relies on the protocols.
At this point, you should be able to explain how local unicast communication provided by hardware is extended to global scale through addressing and routing.
You should understand the principal character of the different types of communication failures and the approaches used to cope with the failures. You should be able to explain the limits of these approaches in providing the ideally reliable communication.
You should be able to characterize the communication performance in terms of both quantitative parameters and qualitative behavior. You should be able to explain the practical function of flow and congestion control mechanisms in face of typical situations requiring flow or congestion control.
Questions.Â
Define the properties of an ideally reliable communication mechanism in terms of messages sent and received by the participants.
What exactly does it mean that communication is reliable ? What is guaranteed when a participant sends a message ? What is guaranteed when a participant receives a message ?
Describe the circumstances under which packet damage cannot be masked by the approaches used to provide reliable communication.
Describe the circumstances under which packet loss and packet duplication cannot be masked by the approaches used to provide reliable communication.
The TCP flow control mechanism is based on the receiver informing the sender of the number of bytes that it can still accept. Explain why this approach is used instead of the receiver simply telling the sender whether it can accept any data or not.
Exercises.Â
NavrhnÄ›te pĹ™enosovĂ˝ protokol, kterĂ˝ bude zaruÄŤovat spolehlivĂ© doruÄŤovánĂ zpráv od jednoho odesĂlatele jednomu pĹ™Ăjemci. Váš návrh by mÄ›l definovat tyto funkce:
void ReliableSend (tMsg *pMessage, tAddr *pTarget); // OdeslánĂ zprávy, blokuje do pĹ™ijetĂ zprávy void ReliableReceive (tMsg &*pMessage, tAddr &*pSource); // PĹ™Ăjem zprávy, blokuje do pĹ™ijetĂ zprávy, zaruÄŤuje // právÄ› jeden pĹ™Ăjem nepoškozenĂ© odeslanĂ© zprávy
Váš návrh by mÄ›l pouĹľĂvat tyto funkce:
void UnreliableSend (tMsg *pMessage, tAddr *pTarget); // OdeslánĂ zprávy, neblokuje, nemusĂ odeslat void UnreliableReceive (tMsg &*pMessage, tAddr &*pSource, int iTimeout); // PĹ™Ăjem zprávy, blokuje do timeoutu, mĹŻĹľe pĹ™ijmout // poškozenou zprávu nebo tutéž zprávu vĂcekrát
Dále pĹ™edpokládejte existenci rozumnĂ˝ch funkcĂ pro manipulaci se zprávami jako je jejich vytvářenĂ a rušenĂ, nastavovánĂ a dotazovánĂ atributĹŻ pĹ™enášenĂ˝ch spolu s obsahem zprávy a podobnÄ›.
The point of this exercise is to cover the entire spectrum of failures possible with the UnreliableSend
and UnreliableReceive
functions.
For every packet exchanged by the protocol, what happens when it gets damaged, lost, duplicated ?
For those unfamiliar with the particular programming language, note that the sending functions expect the message and the address as their inputs, but the receiving functions as their outputs.