Distributed objects (3) Flashcards
Why is it useful to define the interface of an object in an interface definition language?
Precise and unambiguous interface definitions are important for understanding/ maintaning objects.
IDL- based definitions are handy for generating stubs.
The stubs and skeletons generated from DIL compiler ensure only correct parameter values are provided.
What does the client stub do in a remote procedure call?
It packs the function parameters into a message and requests from the OS that it sends the message to the server.
When the client machine receives the return value of the procedure call, the client stub unpacks the message containing the answer and gives it to the client process.
What does the server stub do in a remote procedure call?
I unpacks the message received from client and makes a local call to the requested function.
Then it packs the return value into a message and forward it to back to the client.
What is parameter marshalling?
Packing the parameters of a remote procedure call in to a message.
What does the server and client have to agree on for RPC to work?
An RPC protocol.
i.e The format of messages and how to represent simple data structures.
What is the remote interface of a distributed object?
The interface that objects on local or other machines can use to access a distributed object. It is declared via an Interface Definition Language.
What is Remote Method Invocation (RMI)
Method call from an object in one process to a remote object in another process.
What is Remote Object Reference(ROR)?
Unique identity for distributed objects. Other objects invoking methods of a remote object needs to use its ROR.
RORs can be assigned to variables and be used as arguments in RMI.
What is a client proxy in remote method invocation?
It is responsible for marshalling method invocation and unmarshalling the response the same was as client stub in RPC.
Has same interface as remote object’s class. Can typecheck arguments.
What is skeleton in remote method invocation?
Every class representing a remote object has a skeleton. It unmarshalls arguments of request and invokes corresponding method on (real)remote object.
Marshalls return value into reply message.
What is the job of the dispatcher in remote method invocation?
Receives request messages on the server and uses method- id in request to call correct method in skeleton and forwards request message.