Chapter Outline
Overview of interprocess communication Remote invocations (RPC etc.) Message passing Streams Publish/subscribe Multicast
Middleware Protocols
General purpose services -Naming, browsing -Security -Atomicity -Higher-level communication -RPC, RMI -Message passing -Reliable multicast
routines for remote clients by a local worker process, invoked by local infrastructure
RPC goals
Achieve access transparent procedure call Cannot fully imitate
naming, global
Call-by-reference
Call semantics
Maybe,
Exception
broadcast processing
5
Concurrent
System B
RPC package
6
Implementation of RPC
RPC components:
RPC
10
Implementation of RPC
Server: who will execute the procedure? One server process
infinite call one
arrives : the process starts to execute call at a time, no mutual exclusion problems possible
11
Distributed Objects
Remote Method Invocation ~ RPC A distributed interface
binding: server
The object
resides if
needed: object look through an adapter object may be persistent or transient system-wide
an
Object references:
typically: binding:
Distributed Objects
13
Object Adapter
14
//Declare a systemwide object reference // Initialize the reference to a distributed object // Implicitly bind and invoke a method //Declare a systemwide object reference //Declare a pointer to local objects //Initialize the reference to a distributed object //Explicitly bind and obtain a pointer to // the local proxy //Invoke a method on the local proxy
15
Parameter Passing
16
Design Issues
Language independent interface definition Exception handling Delivery guarantees
RPC
/ RMI semantics
exactly-once)
17
- Re-execute procedure: service should be idempotent - Filter duplicates: server should hold on to results until acknowledged
Retransmit Duplicate Re-execute/ retransmit request filtering no N/A N/A yes yes no yes re-execute retransmit reply
CORBA
Interface Repository IDL Compiler Implementation Repository
Client
OBJ REF
Object (Servant)
DSI
ORB CORE
CORBA shields applications from heterogeneous platform dependencies e.g., languages, operating systems, networking protocols, hardware
Kangasharju: Distributed Systems 20
XML RPC
21
22
Node Net Process A X=f(..); send X to B ... X: 10 OS kernel kernel Process B receive X from A Y=f(X); ... X: 5 Data Communication OS 10 procedure send buffer Network A<=>B procedure receive
xxxxx xxxxx xxxxx xxxxx
23
Binding (1)
Structure of communication network
one-to-one
many-to-one one-to-many,
communication)
multicast, broadcast
24
Binding (2)
Time of binding
static
dynamic
25
General organization of a communication system in which hosts are connected through a network
26
a submitted message is stored in the system until delivered to the receiver (the receiver may start later, the sender may stop earlier) a message is stored only as long as the sending and receiving applications are executing (the sender and the receiver must be executing in parallel)
Transient communication
27
28
the sender continues immediately after submission the sender is blocked until - the message is stored at the receiving host (receiptbased synchrony) - the message is delivered to the receiver (delivery based) - the response has arrived (response based)
Synchronous communication
29
a) b)
c) d)
31
e) f)
Delivery-based transient synchronous communication at message delivery Response-based transient synchronous communication
32
33
2-26
35
Message-Queuing Model
Meaning Append a message to a specified queue Block until the specified queue is nonempty, and remove the first message Check a specified queue for messages, and remove the first. Never block. Install a handler to be called when a message is put into the specified queue.
36
37
38
appl. C
Kangasharju: Distributed Systems 39
communication cumbersome
message violates
architectures
persistent
40
MOM Topics
Topics for variation and development
persistent/transient FIFO/priority translations abstractions
msgs
of msgs
multithreading, msg
routing (source, cost, changes in topology etc) transfer of msgs (at least between msg servers)
secure
41
Message Brokers
42
Publish-subscribe
shared mailbox, everyone can send to it subscribers can select what filter to use guaranteed delivery of all relevant messages to all
subscribers models: header-based, topic-based problems
scalability: ordering
of messages
44
Stream communication
Service Required
maximum data unit size (bytes) Token bucket rate (bytes/sec) Toke bucket size (bytes) Maximum transmission rate (bytes/sec)
Loss sensitivity (bytes) Loss interval (sec) Burst loss sensitivity (data units) Minimum delay noticed (sec) Maximum delay variation (sec) Quality of guarantee
A flow specification.
46
47
Setting Up a Stream
48
2-41
mesh)
other nodes with useful data by an epidemic algorithm exchange information with a random node infected, susceptible, data removed
periodically states:
51
Chapter Summary
Overview of different interprocess communication
techniques and solutions Remote invocations (RPC etc.)
52