A Supervisor is the container to run several DASUs into the same JVM.
The Supervisor blindly forward inputs to each DASU and sends the outpts to the BSDB without adding any other heuristic: things like updating validities when an input is not refreshed are not part of the Supervisor.
The Supervisor gets IASIOs from a InputSubscriber and publishes IASValues to the BSDB by means of a OutputPublisher. The Supervisor itself is the publisher and subscriber for the DASUs i.e. the Supervisor acts as a bridge:
IASIOs read from the BSDB are forwarded to the DASUs that need them as input: the Supervisor has its own subscriber to receive values from the BSDB that are then forwarded to each DASU for processing
values produced by the DASUs are forwarded to the BSDB: the DASUs publishes the output they produce to the supervisor that, in turn, forward each of them to its own publisher.
The same interfaces, InputSubscriber and OutputPublisher, are used by DASUs and Supervisors in this way a DASU can be easily tested directly connected to Kafka (for example) without the need to have it running into a Supervisor.
DASUs are built by invoking the dasufactory passed in the constructor: test can let the Supervisor run with their mockup implementation of a DASU.
If not defined, the constructor builds the HB producer, the output publisher and the command manager using the passed SimpleStringProducer. All those producers are those used in operatons i.e. sending data to the kafka servers. The constructor allows to override this implementation passing special producers, a feature useful for testing
Value parameters
cdbReader
the CDB reader to get the configuration of the DASU from the CDB
commandManagerOpt
the command manager
dasuFactory:
factory to build DASU
hbProducerOpt
the subscriber to send heartbeats
inputSubscriber
the subscriber to get events to be processed
kafkaBrokers
the string with kafka brokers
logLevelFromCommandLine
The log level from the command line; None if the parameter was not set in the command line
The Supervisor acts as publisher for the DASU by forwarding IASIOs to its own publisher. The clean up will be done by by the supervisor on its own publisher so this method, invoked by each DASU, does nothing and always return success.
The Supervisor acts as publisher for the DASU by forwarding IASIOs to its own publisher. The clean up will be done by by the supervisor on its own publisher so this method, invoked by each DASU, does nothing and always return success.
Attributes
Returns
Success or Failure if the clean up went well or encountered a problem
The Supervisor acts as publisher for the DASU by forwarding IASIOs to its own publisher. The initialization has already been made by the supervisor so this method, invoke by each DASU, does nothing and always return success.
The Supervisor acts as publisher for the DASU by forwarding IASIOs to its own publisher. The initialization has already been made by the supervisor so this method, invoke by each DASU, does nothing and always return success.
Attributes
Returns
Success or Failure if the initialization went well or encountered a problem