next up previous contents
Next: STABLE Up: Protocol layers that work Previous: FLUSH

NAKACK

The task of this layer is lossless delivery: all messages sent are tagged with (1) the view in which they were sent, (2) the sender's address and (3) a monotonically increasing sequence number. There are 3 modes the NAKACK layer can operate in: NAK, ACK and OUT_OF_BAND. By sending down a special event (SWITCH_XXX, the mode can be changed. However, if the mode is not NAK, then it will be switched back to NAK after sending 1 message with the different mode. So if 5 messages need to be sent using ACKs, then each message has to be preceeded with a SWITCH_ACK event.

The default is using NAKs: the sender tags a message with a sequence number and the receiver only requests retransmission if there is a gap between the expected and actually received message sequence number.

In the ACK scheme the sender tags a message with a sequence number and the receiver acknowledges every message by sending an ACK back to the sender. When no ACK has been received fro a certain time, the sender retransmits the message. Note that the NAK and ACK schemes use the same sequence numbers. Both modes reset their seqnos to 0 when receiving a view change.

The third mode is for out-of-band control messages (activated by SWITCH_OUT_OF_BAND): this mode does neither employ view IDs, nor does it use the same seqnos as NAK and ACK. It uses its own seqnos, unrelated to the ones used by NAK and ACK, and never resets them. In combination with the sender's address this makes every out-of-band message unique. Out-of-band messages are used for example for broadcasting FLUSH messages.

Since messages are tagged with the view in which they were sent (NAK and ACK mode), messages that have a a smaller view (previous view) than the one currently installed are discarded. Messages with a greater view are stored for future delivery, and message with the same views are delivered.

Modes are switched multiple times during a view change: regular messages are sent using NAKs (default mode). When there is a view change, the FLUSH message is sent using the OUT_OF_BAND mode. Then all unstable messages are re-sent using ACKs. This means we have to wait until we are sure that all unstable messages have been received reliably by every member and have thus become stable. Finally the last message sent in the old view is the view change, which is also sent using ACKs. When receiving the view change all NAKACK layers reset their sequence number to 0. The first regular message broadcast to the group will thus be tagged with sequence number 0.


next up previous contents
Next: STABLE Up: Protocol layers that work Previous: FLUSH

1999-12-13