Professional Documents
Culture Documents
Institute of Technology
Faculty of Computing & Software Engineering
Intro to Distributed
13
Communication Models
Four popular models of communication in DSs:
1. Remote Procedure Call
2. Message-Oriented Communication
3. Stream-Oriented Communication
4. Multicast Communication
20
Communication Models
Remote Procedure Call (RPC)
RPC occurs in the following steps:
1. client procedure calls the client stub in the normal way.
2. client stub pack (marshals) the parameters, builds a message and calls the
local OS
3. client’s OS sends the message to the remote OS.
27
Communication Models
Remote Method Invocation(RMI)
When using RMI
1. Objects can be passed as arguments or received as results
in RMI. This helps to relieve many of the problems
associated with passing pointers in RPC
2. Programmers invoke methods on remote objects.
30
Communication Models
Remote Method Invocation(RMI)
RMI Stub and Skeleton
Stub - an object, acts as a gateway for client side so, all the outgoing
requests are routed through it
It resides at client side and represents the remote object and when caller
invokes method on stub object, it does the ff tasks:
1. It initiates a connection with remote JVM,
bind
The server must first bind its name RMI Server
Local Machine
35
Communication Models
Remote Method Invocation(RMI)