Batch mode single run starter
Batch-mode single starter runs the platform in a batch mode: the configuration of node components and computation is given in XML files and loaded once at startup. Then an instance of ICoreComponent
is created and configuration, and further computation is started. When the computation is finished the platform stops.
The starter uses XmlConfigurationLoader
to load configuration of node components and computation so the configurations must be written in two, separated XML files according to XSD Schema defined by http://age.iisg.agh.edu.pl/xsd/age-2.5.xsd. The detailed description of the file format can be found at Specification of Configuration File.
The starter introduce the following runtime arguments:
-Dage.node.conf=uri_of_node_config
- (required) - path to file containing a configuration of node components;-Dage.computation.conf=uri_of_computation_config
- (optional) - path to the file containing a configuration of computation (i.e. configuration of agents).
Note: The starter is not intended to be run in a distributed environment, however it can be used as a basic implementation.
This is the default implementation of IStarter.
Technical details of implementation
The following diagram presentes the batch single starter and realized interfaces:
The next diagram shows the services and classes used by the starter.
Starter life-cycle:
- initialization of configuration components - firstly the starter creates and register configuration components. It uses
XmlConfigurationLoader
as a default implementation ofIConfigurationLoader
andDefaultConfigurationProvider
as a default implementation ofIConfigurationProvider
. These implementation cannot be changed without modifying starter class; - loading node configuration - node configuration is loaded from file given in
-Dage.node.conf
runtime argument; node components read from the configuration are registered in the component registry (usingIMutableComponentRegistry
interface) - loading computation configuration - (optional) the configuration of computation is loaded from file given in
-Dage.computation.conf
run-time argument; the read configuration is added to configuration provider (usingIMutableConfigurationProvider
interface) - initialization of required components -
ICoreComponen
andIStopCondition
components are taken from the component registry and than initialized; both components are required to run the computation; if they does not exist in the node configuration the starter throwsComponentException
- computation start - the starter starts the computation using
ICoreComponent.start
method; than it waits for the computation to finish.