SlideShare a Scribd company logo
1 of 74
Download to read offline
 Introduction
 Layered protocol
 Types of communication
 Network virtualization
 Network coordination
It is the communication amongst several
processes involved within a distributed system
scenario.
A process is a program in execution.
Process
1
Process
2
Data
Figure.1) Interprocess communication in distributed
system
Process 1
Process 2
Process 1
Process 2 Process 3 Process n
M
M
M
M
---
Fig.1.a) Unicast IPC Fig.1.b) Multicast IPC
I. Synchronous and asynchronous
communication
 In the synchronous form, both send and
receive are blocking operations.
 In the asynchronous form, the use of the send
operation is non-blocking and the receive
operation can have blocking and non-blocking
variants.
II. Message destinations
 A local port is a message destination within a
computer, specified as an integer.
 A port has an exactly one receiver but can have
many senders.
III. Reliability
 A reliable communication is defined in terms of
validity and integrity.
 A point-to-point message service is described as
reliable if messages are guaranteed to be
delivered despite a reasonable number of packets
being dropped or lost.
 For integrity, messages must arrive uncorrupted
and without duplication
IV. Ordering
 Some applications require that messages be
delivered in sender order.
V. Persistent and Transient Communication
 An electronic mail system is a classic example
where communication is persistent.
The java API for inter-process communication in the
internet provides both datagram and stream
communication.
The two communication patterns that are most commonly
used in distributed programs:
I. Client-Server Communication.
II. Group Communication.
Protocols involved in interprocess communication are as
follows:
I. TCP(Transport Control Protocol).
II. UDP(User Datagram Protocol).
Figure 2. Middleware layers
Message Passing:
The application program interface (API) to UDP
provides a message passing abstraction.
Message passing is the simplest form of inter-
process communication.
API enables a sending process to transmit a
single message to a receiving process.
The independent packets containing theses
messages are called datagrams.
In the Java and UNIX APIs, the sender
specifies the destination using a socket.
 Request-reply protocols are designed to support
client-server communication in the form of either
RMI or RPC.
 Group multicast protocols are designed to
support group communication.
 The request and reply messages provide the basis for
remote method invocation (RMI) or remote procedure call
(RPC).
 Remote Method Invocation (RMI)
 It allows an object to invoke a method
in an object in a remote process.
 E.g. CORBA and Java RMI
 Remote Procedure Call (RPC)
 It allows a client to call a procedure in
a remote server.
Figure 3. Request-reply communication
The information to be transmitted in a request
message or a reply message is shown in below.
Figure 4. Request-reply message structure
invocation invocation
remote
invocation
remote
local
local
local
invocation
invocation
A
B
C
D
E
F
Figure 4. Remote and local method
invocations
 Characteristics:
 End point for inter-process communication.
 Message transmission between sockets.
 A socket is associated with either UDP or TCP. Sockets
are bound to ports.
 One process can use many ports .
 Processes don’t share sockets (unless for IP multicast).
 ƒ
Implementations :
 originally BSD Unix, but available in Linux, Windows,…
 APIs in programming languages (e.g., java.net)
 Send
 send a message to a socket associated to a
process .
 can be blocking or non-blocking.
 ƒ
Receive
 receive a message on a socket .
 can be blocking or non.
 Blocking.
 ƒ
Broadcast/Multicast
 send to all processes/all processes in a group.
Figure.5) Communication Using Socket
Marshalling and Unmarshalling
 ƒ
Marshalling: Encode data items so that they
can be written onto a stream.
 ƒ
Unmarshalling: Read an encoding from a
stream and reconstruct the original items.
Examples:
 ƒ
CORBA: CDR(= Common Data
Representation) for primitive and structured
data types that occur in remote method
invocations.
 ƒ
Java Serialization: Applicable to all classes
that implement the interface Serializable.
Figure.6) CORBA Architecture
 The client-server communication is designed to support
the roles and message exchanges in typical client-server
interactions.
 In the normal case, request-reply communication is
synchronous because the client process blocks until the
reply arrives from the server.
 Asynchronous request-reply communication is an
alternative that is useful where clients can afford to
retrieve replies later.
 Avoidance of connection establishment overhead
 No need for flow control due to small amounts of data
are transferred.
The pair wise exchange of messages is not the best
model for communication from one process to a
group of other processes.
A multicast operation is more appropriate.
Multicast operation is an operation that sends a
single message from one process to each of the
members of a group of processes.
Multicasting has the following characteristics:
 Fault tolerance based on replicated services
o A replicated service consists of a group of
servers.
IP Multicast
 IP multicast is built on top of the Internet
protocol, IP.
 IP multicast allows the sender to transmit a
single IP packet to a multicast group.
 A multicast group is specified by class D IP
address for which first 4 bits are 1110 in IPv4.
The membership of a multicast group is dynamic.
A computer belongs to a multicast group if one or
more processes have sockets that belong to the
multicast group.
The following details are specific to IPv4:
 Multicast IP routers
 IP packets can be multicast both on local network and on
the wider Internet.
 Local multicast uses local network such as Ethernet.
 To limit the distance of propagation of a multicast
datagram, the sender can specify the number of routers it
is allowed to pass- called the time to live, or TTL for short.
 Multicast address allocation
 Multicast addressing may be permanent or temporary.
 Permanent groups exist even when there are no members.
 Multicast addressing by temporary groups must be created
before use and cease to exit when all members have left.
Java API to IP Multicast:
 The Java API provides a datagram interface to IP
multicast through the class Multicast Socket, which is a
subset of Datagram Socket with the additional
capability of being able to join multicast groups.
 The class Multicast Socket provides two alternative
constructors , allowing socket to be creative to use
either a specified local port, or any free local port.
Multicast Transmission
A message sent to a specified group of recipients.
Examples
 ƒ
Fault tolerance: Based on replicated services –
requests go to all servers
 ƒ
Spontaneous networking: All nodes of the network
receive messages
 ƒ
Better performance: Through replicated data –the
updated data goes to all storing the data.
 ƒ
Event notification
Types Of Overlay Networks:
1. Distributed hash tables.
2. Peer-to-peer file sharing.
3. Content distributed networks
4. Wireless ad hoc networks.
5. Disruption-tolerant networks.
6. Multicast.
7. Resilience.
8. Security.
Process 1 Process 2
Figure.6)Simple message passing communication
paradigm
1. Simplicity
2. Uniform semantics
3. Efficiency
4. Reliability
5. Correctness
6. Flexibility
7. Security
8. Portability
Send m
……………….
Receive
……………….
message
Figure.7)The architectural model of MPI
Process P Process q
A. Generic send operation
B. Synchronous send operation
C. Buffered send operation
D. Ready send operation
Figure 7. Request-reply communication
Request-Reply Communication
Figure 8. Request-reply message structure
Categories of Request-Reply protocols:
A. The Request Protocol
B. The Request/Reply protocol
C. The Request/Reply/Acknowledge-
Reply Protocol
Figure 9. Open and closed groups
Figure 10. Group membership management
Figure 11. Network Of Brokers
Figure 12.a) Architecture of Public-Subscribe
Figure 12.b) Public-Subscribe Paradigm
Figure 13. Message Queue Paradigm
Figure 14. Topology In WebSPHERE
Measuring Time :
 Traditionally time measured astronomically .
1. Transit of the sun (highest point in the sky)
2. Solar day and solar second
 Problem: Earth’s rotation is slowing down.
1. Days get longer and longer
2. 300 million years ago there were 400 days in the year
 Modern way to measure time is atomic clock.
1. Based on transitions in Cesium-133 atom
2. Still need to correct for Earth’s rotation
 Result: Universal Coordinated Time (UTC).
1. UTC available via radio signal, telephone line, satellite (GPS
 External synchronization
 Internal synchronization
 Cristian’s Algorithm
 Berkeley Algorithm
 Network Time Protocol
Figure 14. Cristian’s Algorithm
Current time from a time server: UTC from
radio/satellite etc Problems:
 time must never run backward
 variable delays in message passing
Calculation:
 Earliest time that S can have sent reply: t0 +
min
 Latest time that S can have sent reply: t0 + T
round – min
 Total time range for answer: T round - 2 *
min
 Accuracy is ± (½Tround - min
Figure 15. Berkeley Algorithm
Berkeley algorithm
 No external synchronization, but one master
server
 Master polls slaves periodically about their
clock readings
 Estimate of local clock times using round
trip estimation
 Averages the values obtained from a group
of processes - Cancels out individual clock’s
tendencies to run fast
 Tells slave processes by which amount of
time to adjust local clock
 Master failure: Master election algorithm
Goals
1. Ability to externally synchronize clients via
Internet to UTC
2. Provide reliable service tolerating lengthy
losses of connectivity
3. Enable clients to resynchronize sufficiently
frequently to offset typical HW drift rates
4. Provide protection against interference
NTP Basic Idea
 Layered client-server architecture, based on
UDP message passing
 Synchronization at clients with higher strata
number less accurate due to increased
latency to strata 1 time server
 Failure robustness: if a strata 1 server fails, it
may become a strata 2 server that is being
synchronized though another strata 1 serve
Procedure-Call and Symmetric Modes
 All messages carry timing history information.
 Local timestamps of send and receive of the previous
NTP message.
 Local timestamp of send of this message.
Figure 16. Procedure-Call and
Symmetric Modes
NTP: Delay and Offset
Figure 17. NTP: Delay and Offset
NTP Implementation
 Statistical algorithms based on 8 most recent <oi, di>
pairs: à determine quality of estimates
 The value of oi that corresponds to the minimum di is
chosen as an estimate for o
 Time server communicates with multiple peers, eliminates
peers with unreliable data, favors peers with higher strata
number (e.g., for primary synchronization partner
selection)
 NTP phase lock loop model: modify local clock in
accordance with observed drift rate
 Experiments achieve synchronization accuracies of 10
msecs over Internet, and 1 msec on LAN using NTP
Example: Totally-Ordered Multicasting(1)
Figure 18. Totally-Ordered Multicasting
(1)
Example: Totally-Ordered Multicasting (2)
Figure 18. Totally-Ordered Multicasting
(2)
Figure 19. Ad-hoc State Snaphots
A logical ring constructed in software.
The Bully Algorithm (1)
 Group {Pi} ”fully connected”; election: ring
 Pi notices: coordinator lost Send
ELECTION(Pi) to the next P
 Pj receives ELECTION(Pi) Send ELECTION(Pi,
Pj) to successor
 n. . .
 Pi receives ELECTION(..., Pi, ...) active_list =
{collect from the message}
NC = max {active_list}
Send COORDINATOR(NC; active_list) to the
next P
A Ring Algorithm (2)
A Ring Algorithm (2)
THANK YOU

More Related Content

Similar to DCS Unit-II COMMUNICATION AND COORDINATION.pdf

Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...
Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...
Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...CSCJournals
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsAya Mahmoud
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Dhivyaa C.R
 
Review Questions -11.Is web server an end system A. There is no.pdf
Review Questions -11.Is web server an end system A. There is no.pdfReview Questions -11.Is web server an end system A. There is no.pdf
Review Questions -11.Is web server an end system A. There is no.pdfanjanaarts2014
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 
CCNA ppt Day 2
CCNA ppt Day 2CCNA ppt Day 2
CCNA ppt Day 2VISHNU N
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
Bt0072 computer networks 2
Bt0072 computer networks  2Bt0072 computer networks  2
Bt0072 computer networks 2Techglyphs
 
OSI model (7 LAYER )
OSI model (7 LAYER )OSI model (7 LAYER )
OSI model (7 LAYER )AAKASH S
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 
B21DA0201_04.ppt
B21DA0201_04.pptB21DA0201_04.ppt
B21DA0201_04.pptDrPreethiD1
 
Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Pokala Sai
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 

Similar to DCS Unit-II COMMUNICATION AND COORDINATION.pdf (20)

Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...
Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...
Deterministic Formulization of End-to-End Delay and Bandwidth Efficiency for ...
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
 
Ch06
Ch06Ch06
Ch06
 
Review Questions -11.Is web server an end system A. There is no.pdf
Review Questions -11.Is web server an end system A. There is no.pdfReview Questions -11.Is web server an end system A. There is no.pdf
Review Questions -11.Is web server an end system A. There is no.pdf
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
CCNA ppt Day 2
CCNA ppt Day 2CCNA ppt Day 2
CCNA ppt Day 2
 
Transport laye
Transport laye Transport laye
Transport laye
 
Ch1 v1
Ch1 v1Ch1 v1
Ch1 v1
 
data communication
data communicationdata communication
data communication
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Lec9
Lec9Lec9
Lec9
 
Bt0072 computer networks 2
Bt0072 computer networks  2Bt0072 computer networks  2
Bt0072 computer networks 2
 
OSI model (7 LAYER )
OSI model (7 LAYER )OSI model (7 LAYER )
OSI model (7 LAYER )
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
B21DA0201_04.ppt
B21DA0201_04.pptB21DA0201_04.ppt
B21DA0201_04.ppt
 
Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 

Recently uploaded

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 

DCS Unit-II COMMUNICATION AND COORDINATION.pdf

  • 1.
  • 2.  Introduction  Layered protocol  Types of communication  Network virtualization  Network coordination
  • 3. It is the communication amongst several processes involved within a distributed system scenario. A process is a program in execution. Process 1 Process 2 Data Figure.1) Interprocess communication in distributed system
  • 4. Process 1 Process 2 Process 1 Process 2 Process 3 Process n M M M M --- Fig.1.a) Unicast IPC Fig.1.b) Multicast IPC
  • 5. I. Synchronous and asynchronous communication  In the synchronous form, both send and receive are blocking operations.  In the asynchronous form, the use of the send operation is non-blocking and the receive operation can have blocking and non-blocking variants.
  • 6. II. Message destinations  A local port is a message destination within a computer, specified as an integer.  A port has an exactly one receiver but can have many senders. III. Reliability  A reliable communication is defined in terms of validity and integrity.  A point-to-point message service is described as reliable if messages are guaranteed to be delivered despite a reasonable number of packets being dropped or lost.  For integrity, messages must arrive uncorrupted and without duplication
  • 7. IV. Ordering  Some applications require that messages be delivered in sender order. V. Persistent and Transient Communication  An electronic mail system is a classic example where communication is persistent.
  • 8. The java API for inter-process communication in the internet provides both datagram and stream communication. The two communication patterns that are most commonly used in distributed programs: I. Client-Server Communication. II. Group Communication. Protocols involved in interprocess communication are as follows: I. TCP(Transport Control Protocol). II. UDP(User Datagram Protocol).
  • 10. Message Passing: The application program interface (API) to UDP provides a message passing abstraction. Message passing is the simplest form of inter- process communication. API enables a sending process to transmit a single message to a receiving process. The independent packets containing theses messages are called datagrams. In the Java and UNIX APIs, the sender specifies the destination using a socket.
  • 11.  Request-reply protocols are designed to support client-server communication in the form of either RMI or RPC.  Group multicast protocols are designed to support group communication.
  • 12.  The request and reply messages provide the basis for remote method invocation (RMI) or remote procedure call (RPC).  Remote Method Invocation (RMI)  It allows an object to invoke a method in an object in a remote process.  E.g. CORBA and Java RMI  Remote Procedure Call (RPC)  It allows a client to call a procedure in a remote server.
  • 13. Figure 3. Request-reply communication
  • 14. The information to be transmitted in a request message or a reply message is shown in below. Figure 4. Request-reply message structure
  • 16.  Characteristics:  End point for inter-process communication.  Message transmission between sockets.  A socket is associated with either UDP or TCP. Sockets are bound to ports.  One process can use many ports .  Processes don’t share sockets (unless for IP multicast).  ƒ Implementations :  originally BSD Unix, but available in Linux, Windows,…  APIs in programming languages (e.g., java.net)
  • 17.  Send  send a message to a socket associated to a process .  can be blocking or non-blocking.  ƒ Receive  receive a message on a socket .  can be blocking or non.  Blocking.  ƒ Broadcast/Multicast  send to all processes/all processes in a group.
  • 18.
  • 20. Marshalling and Unmarshalling  ƒ Marshalling: Encode data items so that they can be written onto a stream.  ƒ Unmarshalling: Read an encoding from a stream and reconstruct the original items. Examples:  ƒ CORBA: CDR(= Common Data Representation) for primitive and structured data types that occur in remote method invocations.  ƒ Java Serialization: Applicable to all classes that implement the interface Serializable.
  • 21.
  • 22.
  • 23.
  • 25.  The client-server communication is designed to support the roles and message exchanges in typical client-server interactions.  In the normal case, request-reply communication is synchronous because the client process blocks until the reply arrives from the server.  Asynchronous request-reply communication is an alternative that is useful where clients can afford to retrieve replies later.  Avoidance of connection establishment overhead  No need for flow control due to small amounts of data are transferred.
  • 26. The pair wise exchange of messages is not the best model for communication from one process to a group of other processes. A multicast operation is more appropriate. Multicast operation is an operation that sends a single message from one process to each of the members of a group of processes. Multicasting has the following characteristics:  Fault tolerance based on replicated services o A replicated service consists of a group of servers.
  • 27. IP Multicast  IP multicast is built on top of the Internet protocol, IP.  IP multicast allows the sender to transmit a single IP packet to a multicast group.  A multicast group is specified by class D IP address for which first 4 bits are 1110 in IPv4. The membership of a multicast group is dynamic. A computer belongs to a multicast group if one or more processes have sockets that belong to the multicast group.
  • 28. The following details are specific to IPv4:  Multicast IP routers  IP packets can be multicast both on local network and on the wider Internet.  Local multicast uses local network such as Ethernet.  To limit the distance of propagation of a multicast datagram, the sender can specify the number of routers it is allowed to pass- called the time to live, or TTL for short.  Multicast address allocation  Multicast addressing may be permanent or temporary.  Permanent groups exist even when there are no members.  Multicast addressing by temporary groups must be created before use and cease to exit when all members have left.
  • 29. Java API to IP Multicast:  The Java API provides a datagram interface to IP multicast through the class Multicast Socket, which is a subset of Datagram Socket with the additional capability of being able to join multicast groups.  The class Multicast Socket provides two alternative constructors , allowing socket to be creative to use either a specified local port, or any free local port.
  • 30. Multicast Transmission A message sent to a specified group of recipients. Examples  ƒ Fault tolerance: Based on replicated services – requests go to all servers  ƒ Spontaneous networking: All nodes of the network receive messages  ƒ Better performance: Through replicated data –the updated data goes to all storing the data.  ƒ Event notification
  • 31.
  • 32. Types Of Overlay Networks: 1. Distributed hash tables. 2. Peer-to-peer file sharing. 3. Content distributed networks 4. Wireless ad hoc networks. 5. Disruption-tolerant networks. 6. Multicast. 7. Resilience. 8. Security.
  • 33. Process 1 Process 2 Figure.6)Simple message passing communication paradigm
  • 34. 1. Simplicity 2. Uniform semantics 3. Efficiency 4. Reliability 5. Correctness 6. Flexibility 7. Security 8. Portability
  • 36. A. Generic send operation B. Synchronous send operation C. Buffered send operation D. Ready send operation
  • 37. Figure 7. Request-reply communication Request-Reply Communication
  • 38. Figure 8. Request-reply message structure
  • 39. Categories of Request-Reply protocols: A. The Request Protocol B. The Request/Reply protocol C. The Request/Reply/Acknowledge- Reply Protocol
  • 40. Figure 9. Open and closed groups
  • 41. Figure 10. Group membership management
  • 42. Figure 11. Network Of Brokers
  • 43. Figure 12.a) Architecture of Public-Subscribe
  • 45. Figure 13. Message Queue Paradigm
  • 46. Figure 14. Topology In WebSPHERE
  • 47. Measuring Time :  Traditionally time measured astronomically . 1. Transit of the sun (highest point in the sky) 2. Solar day and solar second  Problem: Earth’s rotation is slowing down. 1. Days get longer and longer 2. 300 million years ago there were 400 days in the year  Modern way to measure time is atomic clock. 1. Based on transitions in Cesium-133 atom 2. Still need to correct for Earth’s rotation  Result: Universal Coordinated Time (UTC). 1. UTC available via radio signal, telephone line, satellite (GPS
  • 48.
  • 49.  External synchronization  Internal synchronization
  • 50.
  • 51.  Cristian’s Algorithm  Berkeley Algorithm  Network Time Protocol
  • 53. Current time from a time server: UTC from radio/satellite etc Problems:  time must never run backward  variable delays in message passing Calculation:  Earliest time that S can have sent reply: t0 + min  Latest time that S can have sent reply: t0 + T round – min  Total time range for answer: T round - 2 * min  Accuracy is ± (½Tround - min
  • 54. Figure 15. Berkeley Algorithm
  • 55. Berkeley algorithm  No external synchronization, but one master server  Master polls slaves periodically about their clock readings  Estimate of local clock times using round trip estimation  Averages the values obtained from a group of processes - Cancels out individual clock’s tendencies to run fast  Tells slave processes by which amount of time to adjust local clock  Master failure: Master election algorithm
  • 56. Goals 1. Ability to externally synchronize clients via Internet to UTC 2. Provide reliable service tolerating lengthy losses of connectivity 3. Enable clients to resynchronize sufficiently frequently to offset typical HW drift rates 4. Provide protection against interference
  • 57. NTP Basic Idea  Layered client-server architecture, based on UDP message passing  Synchronization at clients with higher strata number less accurate due to increased latency to strata 1 time server  Failure robustness: if a strata 1 server fails, it may become a strata 2 server that is being synchronized though another strata 1 serve
  • 58. Procedure-Call and Symmetric Modes  All messages carry timing history information.  Local timestamps of send and receive of the previous NTP message.  Local timestamp of send of this message. Figure 16. Procedure-Call and Symmetric Modes
  • 59. NTP: Delay and Offset Figure 17. NTP: Delay and Offset
  • 60. NTP Implementation  Statistical algorithms based on 8 most recent <oi, di> pairs: à determine quality of estimates  The value of oi that corresponds to the minimum di is chosen as an estimate for o  Time server communicates with multiple peers, eliminates peers with unreliable data, favors peers with higher strata number (e.g., for primary synchronization partner selection)  NTP phase lock loop model: modify local clock in accordance with observed drift rate  Experiments achieve synchronization accuracies of 10 msecs over Internet, and 1 msec on LAN using NTP
  • 61.
  • 62. Example: Totally-Ordered Multicasting(1) Figure 18. Totally-Ordered Multicasting (1)
  • 63. Example: Totally-Ordered Multicasting (2) Figure 18. Totally-Ordered Multicasting (2)
  • 64. Figure 19. Ad-hoc State Snaphots
  • 65.
  • 66. A logical ring constructed in software.
  • 67.
  • 69.
  • 70.
  • 71.
  • 72.  Group {Pi} ”fully connected”; election: ring  Pi notices: coordinator lost Send ELECTION(Pi) to the next P  Pj receives ELECTION(Pi) Send ELECTION(Pi, Pj) to successor  n. . .  Pi receives ELECTION(..., Pi, ...) active_list = {collect from the message} NC = max {active_list} Send COORDINATOR(NC; active_list) to the next P A Ring Algorithm (2) A Ring Algorithm (2)
  • 73.