A "sender" on one host must convert the objects it wants
to transmit from their actual type to a string (a
process which is known as marshalling)
The receiver, on the other hand, must convert the
incoming string back to objects (a process which is
known as unmarshalling)
An Observation:
This can be very tedious
Motivation (cont.)
Marshalling/Unmarshalling
Motivation (cont.)
One Objective:
Automate the marshalling/unmarshalling process
Another Objective:
Have an object on one host
invoke the methods of an object on another host
A Design for Remote Method Invocation
An Observation:
The proxy pattern provides a way to achieve
both of these goals
Terminology:
A stub is a proxy for a remote object which is
responsible for forwarding method invocations on remote
objects to the host where the actual implementation
resides
The stub communicates with a skeleton of the
remote object which invokes the actual remote object
implementation
A Design for Remote Method Invocation (cont.)
Stubs and Skeletons
A Design for Remote Method Invocation (cont.)
An Observation:
The stub and the remote object cannot be members of the
same class (since they have different responsibilities)
A Requirement:
The stub and the remote object must appear to be of the
same type