Chapter 4 - Communication
Chapter 4 - Communication
04/02/24 1
Outlines
Layerprotocols
Types of Communication
Remote Procedure Call
Remote Object invocation
04/02/24 2
Communication
Inter-process communication is at the heart
of all distributed systems.
It makes no sense to study distributed
04/02/24 3
Due to the absence of shared memory, all
communication in distributed systems is based on
sending and receiving messages.
When process A wants to communicate with process
B, it first builds a message in its own address space.
Then, it executes a system call that causes the OS to
send the message over the network to B.
Many different agreements are needed.
In a variety of levels, varying from the low-level
details of bit transmission to the high-level details of
how information is to be expressed.
04/02/24 4
International Standards Organization (ISO) developed a
reference model that clearly identifies the various levels
involved, gives them standard names, and points out which
level should do which job.
This model is called the Open Systems Interconnection
Reference Model (OSI-RM).
The OSI model is designed to allow open systems to
communicate.
An open system is one that is prepared to communicate
with any other open system by using standard rules that
govern the format, contents, and meaning of the messages
sent and received.
04/02/24 5
These rules are formalized in what are called protocols.
To allow a group of computers to communicate over a
protocols.
Connection oriented protocols: before exchanging data
04/02/24 6
With computers, both connection-oriented and
connectionless communication are common.
In the OSI model, communication is divided up
communication.
Each layer provides an interface to the one above
it.
The interface consists of a set of operations that
04/02/24 7
04/02/24 8
Media (lower) Layers
Physical: Physical characteristics of the media
Data Link: Reliable data delivery across the link
Network: Managing connections across the network
or routing
Transport: End-to-end connection and reliability
(handles
lost packets); TCP (connection-oriented),
UDP (connectionless), etc.
Session: Managing sessions between applications
(dialog control and synchronization); rarely
supported
Presentation: Data presentation to applications; concerned
with the syntax and semantics of the
information transmitted
Application: Network services to applications; contains
protocols that are commonly needed by
users;
Host FTP,
(upper) HTTP, SMTP, ...
Layers
9
A typical message as it appears on the network.
04/02/24 10
Middleware is an application that logically lives in the
application layer, but which contains many general-purpose
protocols that warrant their own layers, independent of
other, more specific applications.
A distinction can be made between high-level
04/02/24 11
There are numerous protocols to support a variety of
middleware services such as:
1. Authorization protocols: establish authentication, that is,
provide proof of a claimed identity.
2. Commit protocol: establish that in a group of processes
either all processes carry out a particular operation, or that
the operation is not carried out at all.
3. Locking protocol: protect against simultaneous access by a
collection of processes that are distributed across multiple
machines.
04/02/24 12
In principle, the core of the mail delivery system can be seen as a
middleware communication service.
04/02/24 14
When a process on machine A calls a procedure
on machine B, the calling process on A is
suspended, and execution of the called
procedure takes place on B.
Information can be transported from the
caller to the called in the parameters and can
come back in the procedure result.
No message passing at all is visible to the
programmer.
This method is known as Remote Procedure Call,
or often just RPC.
04/02/24 15
When read is actually a remote procedure (e.g., one that will run
on the file server's machine), a different version of read, called a
client stub, is put into the library.
A server stub is the server-side equivalent of a client stub:
it is a piece of code that transforms requests coming in over the
network into local procedure calls.
Following the call to send, the client stub calls receive, blocking
itself until the reply comes back.
04/02/24 16
The function of the client stub is to take its parameters, pack
them into a message, and send them to the server stub.
Passing Value Parameters
Passing Reference Parameters
Packing parameters into a message is called parameter
marshaling.
The steps involved in a doing a remote computation through
RPC.
04/02/24 17
This strict request-reply behaviour is unnecessary
when there is no result to return, and only leads to
blocking the client while it could have proceeded and
have done useful work just after requesting the
remote procedure to be called.
To support such situations, RPC systems may provide
facilities for what are called asynchronous RPCs, by
which a client immediately continues after issuing the
RPC request.
With asynchronous RPCs, the server immediately
sends a reply back to the client the moment the RPC
request is received, after which it calls the requested
procedure.
04/02/24 18
(a) The interaction between client and server in a traditional RPC.
(b) The interaction using asynchronous RPC
04/02/24 19
Distributed Computing Environment (DCE), is specific
RPC system which was developed by the Open
Software Foundation (OSF), now called The Open
Group.
DCE is a true middleware system in that it is designed
to execute as a layer of abstraction between existing
(network) operating systems and distributed
applications.
Goals of DCE RPC
For a client to access a remote service by simply
calling a local procedure.
04/02/24 20
04/02/24 21
Questions?
04/02/24 22