Until connected to the simulation, the object model does not and cannot work properly. The connection serves for two main purposes. It ensures registration to the simulation and restoration of the previous state. Once connected the node is ready to participate in the simulation and service requests submitted by other collaborating nodes.
This is what happens when a node connects to the simulation:
The node registers into the simulation using given credentials
Prior connecting to the simulation the node operates in an anonymous mode. In such a mode the node can download prequisite data but can not register into the simulation (note that an extra connection and extra mechanism is used for downloading the data; it has nothing to do with the connection that is utilized to connect a node to a simulation). In order to register the node identity must be known. Then, whenever the node initiates a connection to a remote node it will be authentized using the supplied credentials.
A simulation state is restored from the archive (server nodes only)
The simulation state is being automatically archived. When a server node connects to the simulation its state is restored from the latest valid archive. See archive management Chapter 23, Archivation and Startup.
![]() | Warning |
---|---|
Simulation can not be started if there is a server node without an archive. This also applies when the servers are started for the first time (startup archives must be created first). |
Node objects are created (server and client nodes only)
Node objects are object-level representation of the registered nodes, that participate in the simulation (see Section 14.2, “Node Object”). To enforce instantiation of a node object representing the local node the create_node_object callback will be fired by the system (see above).
Call System::connect() to connect to the simulation. The method takes a reference to an input stream (login file) holding the credentials the node will use to authentize itself (node id and its RSA keys). The standard configuration format is used to store login files (see Section 27.11, “Node Database”):
[ ] node_id : string = "[ Server 1 ]" rsa_private_key : string = "..." rsa_public_key : string = "..." |
![]() | Note |
---|---|
In the Demo client login files are encrypted using client supplied passwords. The encryption is implemented on the "application level". |