DC Lec 4
DC Lec 4
2
Interprocess communication is the heart of any
distributed system
Interprocess
This module focusses on rules that the
Communicat communicating processes must adhere to called
ion protocols in the form of layers and the 2 widely used
communication models
1. Remote procedure call (RPC)
2. Message oriented middleware (MOM)
3. Data Streaming
3
Layers,
interfaces,
and
protocols in
the OSI
model
4
mechanical/electrical details of the physical
transmission of a bit stream.
2. Data-link layer – handles the frames, or fixed-
length parts of packets, including any error
detection and recovery that occurred in the
physical layer.
3. Network layer – provides connections and
routes packets in the communication network,
ISO Layers including handling the address of outgoing
packets, decoding the address of incoming
packets, and maintaining routing information for
proper response to changing load levels.
4. Transport layer – responsible for low-level
network access and for message transfer
between clients, including partitioning messages
into packets, maintaining packet order,
controlling flow, and generating physical
addresses.
5
5. Session layer – implements sessions, or
process-to-process communications protocols.
6. Presentation layer – resolves the differences in
formats among the various sites in the network,
including character conversions, and half
duplex/full duplex (echoing).
7. Application layer – interacts directly with the
ISO Layers users’ deals with file transfer, remote-login
protocols and electronic mail, as well as schemas
for distributed databases.
6
Middleware
Protocols
7
Authentication protocols, to prove identity
Authorization protocols, to grant resource
access to authorized users
Distributed commit protocols, used to allow a
Protocols to group of processes to decided to commit or abort
Support Services a transaction (ensure atomicity) or in fault
tolerant applications.
Locking protocols to ensure mutual exclusion
on a shared resource in a distributed
environment.
8
Persistent Communications:
Once sent, the “sender” can stop executing. The
“receiver” need not be operational at this time –
the communications system buffers the message
Types of as required (until it can be delivered).
Communication
Transient Communications:
The message is only stored as long as the
“sender” and “receiver” are executing. If
problems occur, the message is simply discarded
9
Asynchronous Communications:
A sender continues with other work immediately
upon sending a message to the receiver.
Types of
Communication Synchronous Communications:
A sender blocks, waiting for a reply from the
receiver before doing any other work.
10
a) Persistent asynchronous communication.
It refers to a communication model where
messages are sent and persistently stored by the
system until they are successfully delivered to the
recipient. The sender does not wait for an
immediate response and can continue execution
Distributed after sending the message.
Communications Example: E-Mail
Classifications
11
b) Persistent synchronous communication.
It refers to the communication where the sender
and receiver remain blocked until the message is
delivered and acknowledged, and the message
remains stored by the system until it is
successfully received.
Distributed Example: Remote Procedure Call in Client-
Communications Server Systems
Classifications
12
c) Transient asynchronous communication.
It refers to the communication model where
messages are sent and delivered without being
persistently stored. If the recipient is unavailable
at the time of transmission, the message is lost.
The sender does not wait for an acknowledgment
or response and continues execution after
Distributed sending the message.
Communications Example: UDP
Classifications
13
d) Receipt-based transient synchronous
communication
It is a communication model where the sender
transmits a message and waits for an
acknowledgment (receipt) from the receiver
before proceeding. The message is not
Distributed persistently stored, meaning if the receiver is
Communications unavailable, the message is lost.
Classifications Example: TCP
14
e) Delivery-based transient synchronous
communication at message delivery
It is a communication model which ensures that
the sender waits until the message is delivered to
the receiver but does not wait for processing or
an explicit acknowledgment. If the receiver is
Distributed unavailable, the message is lost.
Communications Example: Real-time IoT Sensor Data
Classifications Transmission
15
f) Response-based transient synchronous
communication
It is a communication model where the sender
transmits a message and waits for the receiver to
process the message and send back a response
before continuing execution. The message is not
Distributed persistently stored, meaning if the receiver is
Communications unavailable, the message is lost.
Classifications Example: DNS Query
16
Primitives used for transient communication
Message Passing
Interface
Transient asynchronous communication:
MPI_bsend
Receipt-based transient synchronous
communication: MPI_send
Delivery-based transient synchronous
communication at message delivery :
MPI_ssend
Response-based transient synchronous
communication: MPI_sendrecv 17