- Distributed object communication
-
Distributed object communication realizes communication between distributed objects in the distributed computing environment.
The main role is to interconnect objects residing in non-local memory space and allowing them to perform remote calls and exchange data. The widely used approach on how to implement the communication channel is realized by using stubs and skeletons. They are generated objects whose structure and behavior depends on chosen communication protocol, but in general provide additional functionality that ensures reliable communication over the network.
When a caller wants to perform remote call on the called object, it delegates requests to its stub which initiates communication with the remote skeleton. Consequently, the stub passes caller arguments over the network to the server skeleton. The skeleton then passes received data to the called object, waits for a response and returns the result to the client stub. Note, there is no direct communication between the caller and the called object.
In more details, the communication consists of several steps:
- caller calls a local procedure implemented by the stub
- stub marshalls call type and input arguments into a request message
- client stub sends the message over the network to the server and blocks the current execution thread
- server skeleton receives the request message from the network
- skeleton unpacks call type from the request message and looks up the procedure on the called object
- skeleton unmarshalls procedure arguments
- skeleton executes the procedure on the called object
- called object performs a computation and returns the result
- skeleton packs the output arguments into a response message
- skeleton sends the message over the network back to the client
- client stub receives the response message from the network
- stub unpacks output arguments from the message
- stub passes output arguments to the caller, releases execution thread and caller then continues in execution
The advantage of this architecture is that neither the caller nor the called object has to implement network related logic. This functionality, that ensures reliable communication channel over the network, has been moved to the stub and the skeleton layer.
Protocols using Stub/Skeleton Approach
- RPC - Remote Procedure Call
- CORBA - Common Object Request Broker Architecture
- DCE - Distributed Computing Environment
- RMI - Remote Method Invocation
- .NET Remoting - .NET Remoting
- DCOM - Distributed Component Object Model
- DDObjects is a framework for distributed objects using Borland Delphi.
- Distributed Ruby (DRb) is a framework for distributed objects using the Ruby programming language.
References
- Plášil, František and Stal, Michael. "An Architectural View of Distributed Objects and Components in CORBA, Java RMI, and COM/DCOM", Software Concepts & Tools (vol. 19, no. 1), January, 1998.
- Farley, Jim. "Java Distributed Computing", O'Reilly, January, 1998.
- "Research Papers", Distributed Systems Research Group, Charles University Prague
Categories:
Wikimedia Foundation. 2010.