A DD system on a given host can also be accessed from a remote host. This is implemented through inheritance: The class DD that the user normally sees is an abstract class, which is instantiated through a local class (called lDD) for accessing an event pool that is on the local host. If the pool is on a remote host, the abstract class DD is instantiated through a proxy object (called rDD). Note that the user normally does not see the difference as he accesses the pool through the interface DD.The following things are noteworthy for the implementation of the remote connection:
- As the DD constructors are private member functions, the user cannot instantiate a lDD or rDD object. Instead he has to use the class DD_factory, to create an event pool. This class then determines where the event pool resides.
- The user specifies the host of the event pool through the name of the DD pool. The following nomenclature is used: The name my_dd refers to an event pool on the local host, the name my_dd@hostXYZ refers to the event pool my_dd on host hostXYZ. Note that the DD_CONFIGURATION_FILE also specifies the host of the pool. If the name of the pool is found in this file, the specified host will be used. If the host entry in the configuration file is localhost, then the local host will always be used.
- How does the remote connection work internally?
Every host that offers the service of a remote DD pool, must have a DD demon running. This demon listens at a fixed port for incoming requests. Upon request the demon forks off a server, which then attaches/creates the DD pool. This server then communicates with the remote process (i.e. its proxy object rDD) through TCP/IP.
The demon and server are implemented by inheritance from an abstract network class (otnet_demon to be found in the package OTOOLS, that accompanies the DD package). The DD objects that are transferred through TCP/IP inherit from an abstract class otnet_object, which declares the abstract member functions writeToSocket and readFromSocket.- What happens if this DD demon is not running?
Well you get an error of the form "rDD::connectToDDdemon: pid 2346 error in connect Connection refused". Just start the DD server by typing \$DD_BIN/dd_server.
Alphabetic index Hierarchy of classes