DIS is based on the object model. DITP, the communication protocol used by DIS, is thus an inter-object communication protocol: it makes it possible to invoke methods of an object hosted in another process.
Client and service
The most simple API to do so, is to have a dummy object on the client side with exactly the same interface as the remote object. The methods of the dummy object, we'll call client, forward the call to the remote object we'll call service. Forwarding a method call means packing arguments into a message, send it to the service that process the call and sent back a message containing the result. From the user point of view there is no difference with calling a method of a local object.
In DITP the client object has an exclusive relationship with the remote service object it is connected to. The service is thus in fact an agent acting on behalf of the client. It is however still under control of the hosting process who can modulate its behavior according to client credentials or specific context. This design has also the benefit to associate a state to the service that may be transient or persistent (restored in a new connection).
Shared services are services that may be accessed by multiple clients simultaneously, Such services are implemented by a dedicated object supporting concurrent method invocations from the different services (agents).
Sequential and concurrent method invocation
Sequential method invocation is the most simple to implement and is also expected to be most frequent use case. The service process incoming method invocation requests one by one in the order of arrival, processing the next one only when the result of the previous one has been sent back. Adding a timeout control system will ensure that the system will never block.
Concurrent method invocation requires that each method invocation is processed by a dedicated thread. The service has to be thread safe and a congestion avoidance system is required in addition to the timeout control. It is thus more complex to design and implement.
DITP is designed so that simple communication models are simple to implement and use, and that more complex communication models can be implemented by composition.
Thus a client-service connection, called a channel, will only support sequential method invocation. Since DITP supports channel multiplexing and in both directions, supporting concurrent method invocation is implemented by encapsulating a pool of parallel client-service connections inside of the client and the service. Callbacks may then be implemented by multiplexing reverse client-service connections. .
0 Comments
Leave a Reply. |
AuthorChristophe Meessen is a computer science engineer working in France. Any suggestions to make DIS more useful ? Tell me by using the contact page. Categories
All
Archives
December 2017
|