Chapter 4
Chapter 4
1
INTRODUCTION
Interprocess communication is at the heart of all
distributed systems.
In a distributed system, processes run on different
machines and can only exchange information through
message passing;
Modem distributed systems often consist of thousands
or even millions of processes scattered across a
network with unreliable communication such as the
Internet.
unless the primitive communication facilities of the
network are replaced by more advanced ones,
development of large scale Distributed Systems
becomes extremely difficult
2
CONT…
3
CONT…
4
4.1. LAYERED PROTOCOLS
Due to the absence of shared memory, all
communication in distributed systems is based on
sending and receiving messages.
two communicating processes must agree on the syntax
and semantics of messages.
agreements are needed at 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.
5
CONT…
6
CONT…
7
OSI Model
8
CONT…
9
layers, interfaces, and protocols in the OSI model
CONT…
10
CONT…
12
discussion between a receiver and a sender in the data link layer
TCP/IP REFERENCE MODEL
oTCP/IP - Transmission Control Protocol/Internet Protocolƒ
used by ARPANET and its successor the Internet.
oƒdesign goals
ƒthe ability to connect multiple networks
(internetworking) in a seamless way
ƒthe network should be able to survive loss of subnet
hardware,
i.e., the connection must remain intact as long as the
source and destination machines are properly functioning
ƒflexible architecture to accommodate requirements of
different applications - ranging from transferring files to
real-time speech transmission
oƒthese requirements led to the choice of a packet-
switching network based on a connectionless internetwork
13
layer
CONT…
14
Middleware Protocols
o a middleware is an application that contains general-
purpose protocols to provide services
o example of middleware services
authentication and authorization services
distributed transactions (commit protocols; locking
mechanisms)
middleware communication protocols (calling a
procedure or invoking an object remotely,
synchronizing streams for real-time data, multicast
services)
o hence an adapted reference model for networked
communications is required
15
CONT…
oCompared to the OSI model, the session and presentation
layer have been replaced by a single middleware layer that
contains application-independent protocols.
16
message is submitted.
17
CONT…
Transient:
a message is stored by the communication system only as
long as the sending and receiving application are executing.
the middleware cannot deliver a message due to a
transmission interrupt, or because the recipient is
currently not active, it will simply be discarded.
all transport-level communication services offer only
transient communication.
the communication system consists traditional store-and-
forward routers.
if a router cannot deliver a message to the next one or the
destination host, it will simply drop the message.
18
CONT…
2. Asynchronous or Synchronous
Asynchronous:
a sender continues immediately after it has submitted its
message for transmission.
This means that the message is (temporarily) stored
immediately by the middleware upon submission.
Synchronous:
the sender is blocked until its request is to be accepted
Three points where synchronization can take place:
1. the sender may be blocked until the middleware notifies that
it will take over transmission of the request.
2. the sender may synchronize until its request has been
3. Discrete or streaming
Discrete:
the parties communicate by messages, each message forming
a complete unit of information.
Streaming:
involves sending multiple messages, one after the other,
where the messages are related to each other by the order
they are sent or because there is a temporal relationship.
20
4.3 REMOTE PROCEDURE CALL
21
1. Conventional Procedure Call, i.e., on a single machine
e.g. count = read (fd, buf, bytes); a C like statement, where
fd is an integer indicating a file
buf is an array of characters into which data are read
bytes is the number of bytes to be read
Stack
pointer
Stack
pointer
parameter passing in a local procedure the stack while the called procedure
call: the stack before the call to read is active
25
27
a) the interconnection between client and server in a traditional RPC
b) the interaction using asynchronous RPC
b. if the result can be collected later
e.g., prefetching network addresses of a set of hosts, ...
the server immediately sends an ack promising that it
will carryout the request
the client can now proceed without blocking
the server later sends the result
28
31
common organization of a remote object with client-side proxy
Binding a Client to an Object
33
CONT…
35