Inter-Process Communication in Distributed System: Chapter Three
Inter-Process Communication in Distributed System: Chapter Three
Shared memory
Remote procedure call (RPC)
Remote Method Invocation (RMI)
Message Oriented
Stream Oriented
Group Communication
Shared Memory
14
Remote Object (Method) Invocation (RMI)
Resulted from object-based technology that has proven its value in
developing non distributed applications
it is an expansion of the RPC mechanisms
it enhances distribution transparency as a consequence of an object
that hides its internal from the outside world by means of a well-
defined interface
Distributed Objects
– an object encapsulates data, called the state, and the
operations on those data, called methods
– methods are made available through interfaces
– the state of an object can be manipulated only by invoking
methods
– this allows an interface to be placed on one machine while
the object itself resides on another machine; such an
organization is referred to as a distributed object.
15
Cont…
The state of an object is not distributed, only the
interfaces are; such objects are also referred to as
remote objects
The implementation of an object’s interface is called
a proxy (analogous to a client stub in RPC systems)
it is loaded into the client’s address space when a
client binds to a distributed object
tasks: a proxy marshals method invocation into
messages and unmarshals reply messages to return the
result of the method invocation to the client
A server stub, called a skeleton, unmarshals
messages and marshals replies
common organization of a remote object with client-side proxy
17
Binding a Client to an Object
A process must first bind to an object before invoking its
methods, which results in a proxy being placed in the
process’s address space
binding can be implicit (directly invoke methods using
only a reference to an object) or explicit (by calling a
special function)
an object reference could contain
network address of the machine where the object
resides
endpoint of the server
an identification of which object
the protocol used
...
18
Message Oriented Communication
19
Message Passing
Message Passing is a form of communication used in parallel
computing(sending messages to different service providers), object-
oriented programming and intercrosses communication.
Message passing provides a mechanism for the exchange of data in
memory distributed across the nodes of a cluster.
Sending message to intermediate storage or directly to the receiver.
E.g email, text & video chatting application(direct)
In this model ,processes or objects can send and receive messages
to other processes. Messages are sent from a sender to one or more
recipients.
– One-one-communication. E.g email, telephone, etc.
– One-to-many communication.1client process to many servers, email, TV&
Radio broadcasting, etc.
– Many-to-one communication. Many clients accessing a single server machine.
– Many-to-many communication
Communication in the message passing paradigm is performed
using the send and receive functions.
Send primitive needs destination process and the
message data as parameters.
Receive primitive needs the name of sender
processor and should provide a storage buffer for the
message.
Message passing systems make workers communicate
through a messaging system. Messages keep everyone
separated, so that workers cannot modify each other's
data.
Example: Radio and TV transmission from source to the
users node, Video conferences, telephone
communication.
Two generic message passing primitives for sending and
receiving messages.
send (destination, message)
receive (source, message)
source or dest={ process name, object name, link,
mailbox, port}
Example:
– Send(A, message)… send message to mail box A
– Receive (A, message )….receiving message from mail
box A.
The message passing system has to be told the following
information: sending process, sources location, data type,
data length, receiving process , destination location .
Classification of communication
Assume the communication system is organized as a computer
network shown below
30
transient asynchronous receipt-based transient synchronous communication
communication
32
Stream Oriented Communication
Until now, we focused on exchanging independent and complete units of
information;Time has no effect on correctness; a system can be slow or fast
however, there are communications where time has a critical role
stream-oriented communication provides facilities for the exchange of time-
dependent information (continuous media) such as audio and video streams
Multimedia
– media
• storage, transmission, interchange, presentation, representation and
perception of different data types:
• text, graphics, images, voice, audio, video, animation, ...
• movie: video + audio + …
Multimedia: handling of a variety of representation media
– end user pull
• information overload and starvation
– technology push
• emerging technology to integrate media
33
The Challenge
new applications
multimedia will be pervasive in few years (as graphics)
storage and transmission
e.g., 2 hours uncompressed HDTV (1920×1080) movie:
1.12 TB (1920×1080x3x25x60x60x2)
videos are extremely large, even after compressed
(actually encoded)
continuous delivery
e.g., 30 frames/s (NTSC), 25 frames/s (PAL) for video
guaranteed Quality of Service
admission control
search
can we look at 100… videos to find the proper one?
34
Types of Media
two types
discrete media: text, executable code, graphics, images;
temporal relationships between data items are not
fundamental to correctly interpret the data
continuous media: video, audio, animation; temporal
relationships between data items are fundamental to
correctly interpret the data
35
• timing in transmission modes
– asynchronous transmission mode: data items are transmitted
one after the other, but no timing constraints; e.g. text transfer
– synchronous transmission mode: a maximum end-to-end delay
defined for each data unit; it is possible that data can be
transmitted faster than the maximum delay, but not slower
– isochronous transmission mode: maximum and minimum end-
to-end delay are defined; also called bounded delay jitter;
applicable for distributed multimedia systems
• a continuous data stream can be simple or complex
– simple stream: consists of a single sequence of data; e.g., mono
audio, video only (only visual frames)
– complex stream: consists of several related simple streams that
must be synchronized; e.g., stereo audio, video consisting of
audio and video (may also contain subtitles, translation to other
languages, ...)
36
Multicast Communication
multicasting: delivery of data from one host to many destinations; for
instance for multimedia applications
• a one-to-many relationship
1.Application-Level Multicasting
• nodes are organized into an overlay network and information is
disseminated to its members (routers are not involved as in network-level
routing)
• how to construct the overlay network
– nodes organize themselves as a tree with a unique path between two
pairs of nodes or
– nodes organize into a mesh network and there will be multiple paths
between two nodes; adv: robust
2. Gossip-Based Data Transmission
– use epidemic protocols where information is propagated among a
collection of nodes without a coordinator
37
Thank you!
?