Actions in distributed object systems
1. Normal object creation (local instantiation)
Usually, when you create an object (say using new or a constructor), it is created inside the
same process where the code runs.
Example: If process C runs new MyObject(), the object will exist inside process C.
2. Remote objects
Sometimes, objects are designed to be remote objects.
A remote object means:
o It has a remote interface (methods can be called from other processes).
o It can be accessed using a remote reference (not a normal memory pointer).
Other processes (on the same computer or even across a network) can make remote
method invocations (RMI) on it.
3. Remote instantiation (the new idea here)
Some objects may have methods that allow creating new remote objects.
For example, in the figure, object L has methods to instantiate new objects.
So, if process C or K remotely calls a method on L, that call can create new objects (M and N)
inside L’s process.
4. Why is this important?
This gives the effect of creating objects remotely.
Instead of C or K creating the objects locally, they ask L to create them on its side.
The newly created objects (M and N) are then available as remote objects (with remote
references), so C and K can interact with them remotely.
5. Step-by-step with the diagram
C → Makes a remote call to L → asks it to create a new object.
L → Instantiates object M inside its own process.
K → Makes another remote call to L → asks it to create another object.
L → Instantiates object N inside its process.
Now, C can talk to M remotely, and K can talk to N remotely.