DC Lec 6
DC Lec 6
RPC
Messages
2. Reply Messages
When the server of an RPC receives a call
message, it could be faced with the following
conditions:
RPC
Messages
Passing
Value in
RPC
A server stub may handle more than one remote
procedure
Issues with Parameter Passing:
1. Marshalling
2. Reference Parameters
Marshalling Arguments and Results
Implementation of RPC involves :
Transfer of arguments from the client
process to the server process and,
Transfer of results from server process to
client process.
1.
These arguments and results are transferred in
Marshalling form of message data between two computers.
1.
Marshalling Procedure:-
For successful marshalling, the client &
server ,both should know the methods used.
It is provided as a part of RPC software: That
is the Best way
User-defined methods
Parameter Marshalling:
There is more than just wrapping parameters
into a message.
Client and server machines may have different
data representations (example: byte ordering).
Wrapping a parameter means transforming a
value into sequence of bytes.
1. Client and server have to agree on the same
encoding:
Marshalling How are basic data values represented
(integers,floats, characters)
How are complex data values represented
(arrays,unions)
Client and server need to properly interpret
messages, transforming them into machine-
dependent representations
Example:
An integer (one 32-bit word), and a four-character
string (one 32-bit word)
Consider integer 5 and string JILL
The little numbers in boxes indicate the address of
each byte
Passing
Value
Parameters
Passing
Value
Parameters
2. 1. Call by value
Reference
Parameters 2.Call by reference