Reliable Communication
description
Transcript of Reliable Communication
![Page 1: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/1.jpg)
Reliable Communication
Smita HiremathCSC 8530
![Page 2: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/2.jpg)
Reliable Client-Server CommunicationPoint-to-Point communication Established by TCP
Masks omission failure, crash failure not masked
![Page 3: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/3.jpg)
Cont…RPC Semantic in the presence of Failure1. The client is unable to locate the server2. The request message from the client to the
server is lost3. The server crashes after receiving a request4. The reply message from the server to the
client is lost5. The client crashes after sending the request.
![Page 4: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/4.jpg)
Cont…Client Cannot Locate the Server Server might be down Server evolves and new version of interface is
installedLost Request Messages Easiest one to deal Client stub start the timer when sending the
request.
![Page 5: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/5.jpg)
Cont… Server Crashes
A server in client-server communicationa) Normal caseb) Crash after execution c) Crash before execution
![Page 6: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/6.jpg)
Cont… At least once semantics – Guarantees
that the RPC has been carried out at least once, but possibly more.
At most once semantics – Guarantees that the RPC has been carried out at most once, but possibly none at all
Guarantees nothing. RPC may have been carried out anywhere from zero to a large number of times
![Page 7: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/7.jpg)
Cont…Lost Reply Message Some requests can be repeated (idempotent) Assign each request a sequence number
Client Crashes Computations are orphans Extermination – the log is kept on the disk or some
other medium that survives crash. Reincarnation – divide the time up into sequential
numbered epochs.
![Page 8: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/8.jpg)
Cont… Gentle reincarnation – computations are killed if the
owner cannot be found. Expiration – RPC is given standard amount of time.
![Page 9: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/9.jpg)
Reliable Group CommunicationBasic Reliable-Multicasting Message sent to a process group should be
delivered to each member of that group. Agreement exists on who is the a member of
the group.
![Page 10: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/10.jpg)
Reliable-Multicasting scheme
A simple solution to reliable multicasting when all receivers are known and are assumed not to fail
a) Message transmissionb) Reporting feedback
![Page 11: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/11.jpg)
Scalability in Reliable MulticastingTwo different approaches Nonhierarchical Feedback Control Hierarchical Feedback Control
![Page 12: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/12.jpg)
Nonhierarchical Feedback Control Scalable Reliable Multicasting (SRM) Never acknowledges successful delivery of
multicast messages. If the receiver missed a message, it multicasts
its feedback to the rest of the group, which allows another group member to suppress its own feedback.
Only a single feedback message will reach the sender, which in turn subsequently retransmits the message.
![Page 13: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/13.jpg)
Nonhierarchical Feedback Control
Several receivers have scheduled a request for retransmission, but the first retransmission request leads to the suppression of others.
![Page 14: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/14.jpg)
Scale reasonably well Problems with this approach
Ensuring that only one request for retransmission is returned to the sender requires accurate scheduling of feedback messages at each receiver.
Feedback also interrupts those processes to which the message has been successfully delivered.
Nonhierarchical Feedback Control
![Page 15: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/15.jpg)
Hierarchical Feedback Control Scalability for very large groups of receivers. The group of receivers are partitioned into
number of subgroups, which are organized into trees.
Each subgroup appoints a local coordinator, which is responsible for handling retransmission
Local coordinator will have its own history buffer.
![Page 16: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/16.jpg)
The essence of hierarchical reliable multicasting.a) Each local coordinator forwards the message
to its children.b) A local coordinator handles retransmission
requests.
Hierarchical Feedback Control
![Page 17: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/17.jpg)
Atomic Multicast Atomic multicast problem –
message must be delivered to either all processes or none at all.
![Page 18: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/18.jpg)
Virtual Synchrony
The logical organization of a distributed system to distinguish between message receipt and message delivery
![Page 19: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/19.jpg)
Cont…
The principle of virtual synchronous multicast.
![Page 20: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/20.jpg)
Message OrderingFour different orderings: 1. Unordered multicasts2. FIFO-ordered multicasts3. Causally-ordered multicasts4. Totally-ordered multicasts
![Page 21: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/21.jpg)
Cont…Process P1 Process P2 Process P3
sends m1 receives m1 receives m2
sends m2 receives m2 receives m1
Three communicating processes in the same group. The ordering of events per process is shown along the vertical axis.
![Page 22: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/22.jpg)
Cont…Process P1 Process P2 Process P3 Process P4
sends m1 receives m1 receives m3 sends m3
sends m2 receives m3 receives m1 sends m4
receives m2 receives m2
receives m4 receives m4
Four processes in the same group with two different senders, and a possible delivery order of messages under FIFO-ordered multicasting
![Page 23: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/23.jpg)
Cont…Multicast Basic Message
OrderingTotal-ordered Delivery?
Reliable multicast None No
FIFO multicast FIFO-ordered delivery No
Causal multicast Causal-ordered delivery No
Atomic multicast None Yes
FIFO atomic multicast
FIFO-ordered delivery Yes
Causal atomic multicast
Causal-ordered delivery Yes
Six different versions of virtually synchronous reliable multicasting.
![Page 24: Reliable Communication](https://reader035.fdocuments.in/reader035/viewer/2022062305/56815e17550346895dcc7531/html5/thumbnails/24.jpg)
Implementing Virtual Synchrony
a) Process 4 notices that process 7 has crashed, sends a view changeb) Process 6 sends out all its unstable messages, followed by a flush messagec) Process 6 installs the new view when it has received a flush message from
everyone else