Chapter 4-Communication
Chapter 4-Communication
Chapter-4
Communication
Stack pointer
25/05/24
steps involved in doing remote computation through RPC
Distributed System 18
2. Passing Reference Parameters
assume the parameter is a pointer to an array
copy the array into the message and send it to the server
the server stub can then call the server with a pointer to this
array
the server then makes any changes to the array and sends it
back to the client stub which copies it to the client
this is in effect call-by-copy/restore
optimization of the method
one of the copy operations can be eliminated if the stub
knows whether the parameter is input or output to the
server
if it is an input to the server (e.g., in a call to write), it need
not be copied back
if it is an output, it need not be sent over in the first place;
only send the size
the above procedure can handle pointers to simple arrays
and structures, but difficult to generalize it to an arbitrary
data structure
25/05/24 Distributed System 19
Asynchronous RPC
if there is no need to block the client until it gets a reply
two cases
1. if there is no result to be returned
e.g., adding entries in a database, ...
the server immediately sends an ack promising that it
will carryout the request
the client can now proceed without blocking
two examples:
DCE Remote Objects
Java RMI
read
25/05/24
pages 93-98 Distributed System 28
4.4 Message Oriented Communication
• RPCs and RMIs are not adequate for all distributed system
applications
• the provision of access transparency may be good but they
have semantics that is not adequate for all applications
• example problems
• they assume that the receiving side is running at
the time of communication
• a client is blocked until its request has been
processed
Persistent Transient
Asynchronous