2.9. Rehearsal

The purpose of this section is to sketch the principles and issues related to implementing the multicast 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 multicast communication provided by hardware is extended to global scale through addressing and routing and explain how the use of multicast differs from the use of multiple unicasts in this context.

You should understand how the approaches used to cope with communication failures are extended from unicast to multicast.

You should be able to define the properties of various message ordering guarantees and outline both the approaches used to provide such guarantees and the applications likely to require such guarantees.

Questions. 

  1. The sender initiated and receiver initiated error recovery schemes differ in which of the two communicating sides is responsible for keeping track of delivered packets. Explain how this difference impacts the management of memory used to store packets.

  2. The use of positive acknowledgements in multicast can lead to network congestion problems due to excessive acknowledgement traffic, also termed as ACK implosion. Outline scenarios in which this problem occurs and approaches used to remedy the problem while preserving positive acknowledgements.

  3. The use of negative acknowledgements in multicast can lead to network congestion problems due to excessive acknowledgement traffic, also termed as NAK implosion. Outline scenarios in which this problem occurs and approaches used to remedy the problem while preserving negative acknowledgements.

  4. Define the source ordering guarantees in the context of multicast communication and explain in what situations and why this ordering is useful.

  5. Define the causal ordering guarantees in the context of multicast communication and explain in what situations and why this ordering is useful.

  6. Define the total ordering guarantees in the context of multicast communication and explain in what situations and why this ordering is useful.

  7. In a form of algorithms used by the senders and the receivers, sketch the approach used to achieve source ordering in multicast communication.

  8. In a form of algorithms used by the senders and the receivers, sketch the approach used to achieve causal ordering in multicast communication. Use of a distributed algorithm is considered better than use of a centralized one.

  9. In a form of algorithms used by the senders and the receivers, sketch the approach used to achieve total ordering in multicast communication. Use of a distributed algorithm is considered better than use of a centralized one.

    Hint

    Stronger ordering does not necessarily require more complex logical clock.

  10. The Lamport Clock is a logical clock used in some distributed algorithms. Outline the algorithm used to calculate the Lamport Clock timestamp and explain what are the useful properties of the timestamp.

  11. The Vector Clock is a logical clock used in some distributed algorithms. Outline the algorithm used to calculate the Vector Clock timestamp and explain what are the useful properties of the timestamp.

  12. Present a suitable example of a multicast communication in which sender ordering is violated. Explain why the ordering is violated. Use a notation in which S(A,X->B,C) denotes node A sending message X to nodes B and C and R(A,X) denotes node A receiving message X.

  13. Present a suitable example of a multicast communication in which causal ordering is violated, but less strict ordering guarantees are preserved. Explain why the ordering is violated. Use a notation in which S(A,X->B,C) denotes node A sending message X to nodes B and C and R(A,X) denotes node A receiving message X.

  14. Present a suitable example of a multicast communication in which total ordering is violated, but less strict ordering guarantees are preserved. Explain why the ordering is violated. Use a notation in which S(A,X->B,C) denotes node A sending message X to nodes B and C and R(A,X) denotes node A receiving message X.

Exercises. 

  1. Navrhněte přenosový protokol, který bude zaručovat spolehlivé doručování zpráv od jednoho odesílatele více příjemcům. Váš návrh by měl definovat tyto funkce:

    void ReliableSend (tMsg *pMessage, tAddrList *pTargetList);
      // Odeslání zprávy, blokuje do přijetí zprávy všemi příjemci
    
    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ě a existenci rozumných funkcí pro manipulaci se seznamem adres jako je jeho procházení.

    Zadání vyžaduje návrh protokolu pro spolehlivý multicast nad nespolehlivým unicastem, na rozdíl od obvyklejšího návrhu spolehlivého multicastu nad nespolehlivým multicastem. Vysvětlete, jaký má toto omezení vliv na vlastnosti vašeho návrhu.

    Hint

    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.