self-stabilizing end-to-end communication in bounded capacity, omitting, duplicating and non-fifo...
DESCRIPTION
This work was presented in 14th International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS 2012) Toronto, Canada (1-4 October 2012). Abstract. End-to-end communication over the network layer (or data link in overlay networks) is one of the most important communication tasks in every communication network, including legacy communication networks as well as mobile ad hoc networks, peer-to-peer networks and mash networks. We study end-to-end algorithms that exchange packets to deliver (high level) messages in FIFO order without omissions or duplications. We present a self-stabilizing end-to-end algorithm that can be applied to networks of bounded capacity that omit, duplicate and reorder packets. The algorithm is network topology independent, and hence suitable for always changing dynamic networks with any churn rate.TRANSCRIPT
Self-Stabilizing End-to-End Communication
in Bounded Capacity, Omitting, Duplicating and non-FIFO
Dynamic NetworksShlomi Dolev1, Ariel Hanemann1, Elad M. Schiller2, and
Shantanu Sharma1
1 Department of Computer Science, Ben-Gurion University of the Negev, Israel
2 Department of Computer Science and Engineering, Chalmers University of Technology, Sweden
14th International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS 2012)
Toronto, Canada (1-4 October 2012)
Outline
• Introduction
• Problem Specification
• The Algorithm
• Key Features
• Conclusion
2of 27
• End-to-end communication is an essential task in communicating systems
• Intromission of errors in message transmission is common
• Dynamic networks have a greater chance of having errors, like, omission, duplication, reordering, than conventional networks
• Network has known capacity constant, which is an upper bound on number of packets in the network
Introduction
S R
Omission of packets
S R
Duplication by the sender
S R
Duplication by the channel
S R
Reorder
S R
capacity of the channel
S R
capacity packets
capacity of the “channel”
• Self-Stabilization
– A self-stabilizing system is a system that can automatically recover following the occurrence of transient faults
– e.g.-token based mutual exclusion algorithm
Introduction
4of 27
Outline
• Introduction
• Problem Specification
• The Algorithm
• Key Features
• Conclusion
Problem Specification
• Design an algorithm for a bounded capacity non-FIFO network which– Guarantee exactly one copy of packet delivery
– Tolerate corruption, omission, duplication of messages by the “channel” and the sender
– Deliver messages in the same order they were sent
– Applied to topological independent network
– Employed to any starting configuration
5of 27
Problem Specification
• Why new end-to-end communication protocol?– TCP is not self-stabilizing
6of 27
Outline
• Introduction
• Problem Specification
• The Algorithm
• Key Features
• Conclusion
The Algorithm-Motivation
• Dolev et al* has presented self-stabilizing data link algorithm for reliable FIFO packet delivery over bounded non-FIFO and non-duplicating channel
• The sender sends a message infinitely often until it gets ‘3capacity + 2‘ identical acknowledgements
• The receiver delivers a message when it gets identical ‘capacity + 1‘ messages
Shlomi Dolev, Swan Dubois, Maria Potop-Butucaru, and Sébastien Tixeuil. Stabilizing data-link over non-fifo channels with optimal fault-resilience. Inf. Process. Lett., 111(18):912–920, 2011.
*
7of 27
The Algorithm-Motivation
S R
Alternating bitab = 0
Now, the receiver delivers the message m only onceand changes last_delivered = 0
Last delivered alternating bit
last_delivered = 1
m, 0
ack(m, 0)
1st message
2ed message
3rd message
capacity+1message
mm
m
m
1
2
capacity
capacity+1
3capacity+1
3capacity+2
Acknowledgments
Messages
capacity messages
The channel may contain capacity (or zero) messages in the channel from sender to receiver
Hence, the sender sends capacity +1 messages to the receiver.
capacity messages
The channel may contain capacity (or zero) messages in the channel from receiver to sender
Hence, the sender waits 3capacity+2 acknowledgement messages
capacity acks for message in the channel from sender to receivercapacity+1 acks for the message sent by sendercapacity acks for message in the channel from receiver to sender1 ack for bad initialization
m, 0 m, 0
ack(m, 0)ack(m, 0)ack(m, 0)
Last delivered alternating bit
last_delivered = 0
But, the sender sends message until it gets 3capacity+2 acknowledgements. However, the receiver acknowledges all incoming message but do not store (due to same last_delivered=0)
m, 0
ack(m, 0)
m, 0
ack(m, 0)
Now, the sender fetches new message, changes alternating bit to 1 and repeat the whole process
8of 27
The Algorithm-Motivation
• Disadvantages Dolev et al*:– Explicit synchronization of the sender and the
receiver
– One packet delivery requires lots of packet flow overburden network
– Does not consider duplication by the channel
Shlomi Dolev, Swan Dubois, Maria Potop-Butucaru, and Sébastien Tixeuil. Stabilizing data-link over non-fifo channels with optimal fault-resilience. Inf. Process. Lett., 111(18):912–920, 2011.
*
9of 27
S2E2C Algorithm
• S2E2C (Self-Stabilizing End-to-End Communication) Algorithm
– Overcomes all the cons of Dolev et al (presented previously)
– Sends n messages (packets) infinitely often instead of one message at a time
– Consider the duplication by the channel
– Message to packet transformation
10of 27
S R
Alternating Index AltIndexs= 1 LastDeliveredIndexr = 0
Now, the receiver selects majority of the message s and deliver it
Packet_set
1,0,m1,1,m
(2,2,m) (1,2,m)
1,n-1,m
(1, 0, m)
(1, 0, m)
(1, 1, m)(1, 1, m)
(1, 1, m)
(0, 2, m)
(1, 2, m)
2,2,d3
1,capacity,m
(2, 3, m)
(1, 3,m)(1,3,m) (2,3,m)
(1, capacity, m)(1, capacity+1, m)
1,capacity+1,m
(1, n-1, m)m
Correct messages
S2E2C Algorithm
(1, capacity, m)2,3,m
1,2,m1,3,m
After the delivery of the correct messages, the receiver acknowledges the sender.
Alternating Index
Label Data
(2, 2, m)
(1, 0, m)
Transmission of messages from the sender to the receiver.
Capacity
• With only one message
11of 27
The Algorithm-The Idea
• Distinct Labels with each outgoing packets– prevent duplication and guarantee in-order delivery of
messages as they were sent
• Alternating index 0, 1 or 2– avoids explicit synchronization between the sender and the
receiver
• The receiver accumulates packets of ‘n‘ distinct labels with identical alternating index before the delivery of messages
• The sender waits for capacity+1 distinct labels acknowledgements before the next fetch
12of 27
S R
Alternating Index AltIndexs= 1 LastDeliveredIndexr = 0
Now, the receiver selects n distinct labels which have identical alternating index except LastDeliveredIndex.
ACK_set
01
Packet_set
1,0,d1
1,1,d2
(2,2,d3) (1,2,d3)
1,n-1,dn-1
(1, 0, d1)
(1, 0, d 1)
(1, 1, d2)(1, 1, d2)
(1, 1, d 2)
(0, 2, d 3)
(1, 2, d3)
2,2,d3
1,capacity,dc
(2, 3, d 4)
(1, 3, d4)(1,3,d4) (2,3,d4)
(1, capacity, dc)(1, capacity+1, dc+1)
1,capacity+1,dc+1
(1, n-1, dn-1)
1st message
2edmessage
3rd message
plth message
Messages with errors
1st message
2edmessage
3rd message
plth message
Correct messages
0, 11 , 1capacity, 1
S2E2C Algorithm
capacity
(1, capacity, dc)2,3,d4
1,2,d3
1,3,d4
After the delivery of the correct messages, the receiver acknowledges the sender.
Alternating Index
Label Data
(2, 2, d 3)
(1, 0, d 1)
Transmission of messages from the sender to the receiver.Transmission of acknowledgements from the receiver to the sender.
Capacity
13of 27
1st message
2ed message
3rd message
plth message
ml
The sender fetches pl messages of ml length
The Algorithm at Sender
14of 27
1st message
2ed message
3rd message
plth message
ml
1st bit 2ed bit 3rd bit mlth bit
Error Correcting Encoding
Error Correcting Bits
n > ml
AltIndexlbl
1st Packet2ed Packet
3rd Packet nth Pacet
The Algorithm at Sender
The sender appends redundant bits to each pl message which results in message length n (n>ml)
Consider all the bits of each pl messages
ai ai ai ai ai ai1 2 3 ml n-1 n
15of 27
The Algorithm at Sender
• The transmitting packet has the form ofai, lbl, dat
ai is alternating indexlbl is labelsdat is data which is formed by ith bit of all messages
• The sender waits for capacity + 1 distinct label acknowledgements before next fetch
• The sender changes its alternating index x to x+1 mod 3, at every fetch
16of 27
The Algorithm at Receiver
• The receiver collects packets of n distinct labels which have alternating index different from last delivered index
– capacity distinct labels may be from the channel
– n – capacity distinct label packets must be from the sender
• The receiver forms messages form all incoming packets
ith message is formed by the ith bit of every packet
ai ai ai ai ai1 2 3 ml n-1 n
ai
The Algorithm at Receiver
• After delivery of the message– Resets data structure– changes LastDeliveredIndex to the value of delivered
message alternating index
• The receiver acknowledges the sender with ’capacity + 1’ distinct labels and the value of LastDeliveredIndex
18of 27
Outline
• Introduction
• Problem Specification
• The Algorithm
• Key Features
• Conclusion
Key Features
• Handles capacity corruptions in the messages
• Does one time delivery of message with handling of omission and reorder, i.e., simulate reliable FIFO message delivery over the non-FIFO network
• No explicit synchronization between the sender and the receiver
• No need of denotative reset operation at the sender and at the receiver
• Topological independence
19of 27
Key Features
• Handles capacity corruptions in the messages
• The intromission of error correcting bits is capable to prevent capacity errors or loss of capacity packets
• capacity corruption is equivalent to loss of distinct capacity labels packets
ai ai ai ai ai1 2 3 ml n-1 n
ai
20of 27
Key Features
• Handles capacity corruptions in the messages
• Does one time delivery of message with handling of omission and reorder, i.e., simulate reliable FIFO message delivery over the non-FIFO network
• No explicit synchronization between the sender and the receiver
• No need of denotative reset operation at the sender and at the receiver
• Topological independence
Key Features
• Does one time delivery of message with handling of omission and reorder– The omission of packets is prevented by error
correcting bits
– The duplication of messages is done by either channel or the sender• The channel can duplicate up to capacity packets• The sender duplicates each packets infinity often
– Distinct labels ensures one time order delivery of all the messages
21of 27
Key Features
• Handles capacity corruptions in the messages
• Does one time delivery of message with handling of omission and reorder, i.e., simulate reliable FIFO message delivery over the non-FIFO network
• No explicit synchronization between the sender and the receiver
• No need of denotative reset operation at the sender and at the receiver
• Topological independence
Key Features
• No explicit synchronization between the sender and the receiver– Synchronization of alternating index is necessary due to
arbitrary initialization
– If the sender and the receiver are having same alternating index, then the receiver does not deliver incoming messages. But, it acknowledges the sender by capacity + 1 distinct labels
– On reception of capacity + 1 distinct labels, the sender changes alternating index and fetches new messages
22of 27
Key Features
• No explicit synchronization between the sender and the receiver– Why alternating bit 0 and 1 is not useful in implicit
synchronization?
S R
Alternating Index AltIndexs= 0 LastDeliveredIndexr = 0
ACK_set
0,0
1,0
capacity-1,0
Packet_set
Alternating Index AltIndexs= 1
1,0,*1,1,*1,2,*
capacity ,0
(0, 0, *)
1,n -2,*
(1,n-1,*)
1,n-1,*The receiver changes LastDeliveredIndexr to 1 and resets Packet_set
LastDeliveredIndexr = 1
0,0,*0,1,*
0,2,*
0,n -2,*Now, the sender sends packets with AltIndexs 0
(0, 1, *)(0, 2, *)(0, n-2, *)
The sender gets acknowledgement from the channel
capacity,0
Now, the sender resets and changes AltIndexs
0,1
0,11,1
capacity-1,1
The receiver acknowledges the sender
1,1Capacity-1,1
This situation is same as initial starting configuration, where the sender and the receiver are having alternting bit 0. Now, we are having alternating bit 1 at both the end
Such situation is successfully handled by alternating index 0, 1, 2
23of 27
Key Features
• No explicit synchronization between the sender and the receiver– Use of alternating index 0, 1 and 2
S R
Alternating Index AltIndexs= 1 LastDeliveredIndexr = 1
ACK_set
0,1
1,1
capacity-1,1
Packet_set
Alternating Index AltIndexs= 2
0,0,*0,1,*0,2,*
capacity ,1
(1, 0, *)
0,n -2,*
(0,n-1,*)
0,n-1,*The receiver changes LastDeliveredIndexr to 0 and resets Packet_set
LastDeliveredIndexr = 0
1,0,*1,1,*
1,2,*
1,n -2,*1,n-1,*
Now, the sender sends packets with AltIndex 1
(1, 1, *)(1, 2, *)(1, n-2, *)
The sender gets acknowedgement from the channel
Capacity, 1
Now, the sender resets and changes AltIndex to 2The receiver gets packet form the channel
(1,n-1,*)
The receiver changes LastDeliveredIndexr to 1 and resets Packet_set
Now, the sender and the receiver are synchronized
0, 1
24
of 27
Key Features
• Handles capacity corruptions in the messages
• Does one time delivery of message with handling of omission and reorder, i.e., simulate reliable FIFO message delivery over the non-FIFO network
• No explicit synchronization between the sender and the receiver
• No need of denotative reset operation at the sender and at the receiver
• Topological independence
Key Features
• No need of denotative reset operation at the sender and at the receiver
– In arbitrary initialization, the sender and the receiver may have some garbage in its data structure then both do reset
– The reset process for garbage items is only required at arbitrary stages
25of 27
Key Features
• Handles capacity corruptions in the messages
• Does one time delivery of message with handling of omission and reorder, i.e., simulate reliable FIFO message delivery over the non-FIFO network
• No explicit synchronization between the sender and the receiver
• No need of denotative reset operation at the sender and at the receiver
• Topological independence
26of 27
Outline
• Introduction
• Problem Specification
• The Algorithm
• Key Features
• Conclusion
Conclusion
• A self-stabilizing end-to-end communication algorithm
• Topological independent, fits for dynamic networks
• Implicit sender/receiver synchronization
• Simulate perfect FIFO behavior – in-order delivery, avoid omission, duplication by the sender, duplication by the channel - over non-FIFO networks
Interested audience may refer the paper with the same title for details and proofs.27of 27
Shlomi Dolev1, Ariel Hanemann1, Elad M. Schiller2, and Shantanu Sharma1
1 Department of Computer Science, Ben-Gurion University of the Negev, Israel
{dolev,hanemann,sharmas}@cs.bgu.ac.il2 Department of Computer Science and Engineering, Chalmers
University of Technology, [email protected]
Presentation is available at
http://www.cs.bgu.ac.il/~sharmas/publication.html