Introduction
This documentation describes the shared node space configuration in HumanOS Kernel PeMiL library.
The shared node space is a distributed space of nodes (objects) living along different HumanOS micro-services. The exchange of nodes uses a bidirectional communication protocol, like MQTT, RmQ, etc.
The shared node space has two different communication levels:
- Exchange of nodes living in the local node spaces of micro-services
- Exchange of system monitoring and controlling information along micro-services
- Distributing workflow activities to different micro-services, also called agents.
System Monitoring
Each micro-services has a full functionality of system monitoring, that includes
- Observation of micro-service
- Observation of task processors running in UHAL
Typically, all information are processed only locally.
Master-Slave System Control
HumanOS micro-services allow to exchange the monitoring data (sensor values) to another micro-service.
The configuration must be put in appsettings.json of the micro-services.
In following example, the micro-service MicroServiceA
sends its monitoring data to the master controller of the micro-service with id 988F7E60-F411-4A45-BE5D-CE5D177329AF
.
{
"HumanOS": {
"ServiceId": "D9E42C1B-3B25-4167-8820-2014F0BC2807",
"ServiceName": "MicroServiceA",
"SharedNodeSpace": {
"Type": "HumanOS.PeMiL.MQTTMessageBus.TSharedNodeSpaceHub, HumanOS.PeMiL.MQTTMessageBus",
"Address": "localhost",
"MasterSystemControllerId": "988F7E60-F411-4A45-BE5D-CE5D177329AF"
}
...
}
}
Behind the Scene
-
The micro-service is started, yet without shared node space. The monitoring runs locally.
-
If there exists a valid SharedNodeSpace setting and the
MasterSystemControllerId
is configured, the remote micro-service is contacted and a MasterSystemController is created. -
All sensor data are then forwarded to the MasterSystemController.
Failing Behavior
- If the micro-service of the MasterSystemController is restarted, the shared node space automatically reconnects the streams.
- If the communication fails, e.g. Broker down, each micro-service try to reconnect. Once the connection is established, all exchanges are automatically recovered.
Agent Orchestrator
An agent orchestrator is a micro-service managing and distributing workflow activities to different agents (client micro-services). Typically, each agent has its skills and registers himself at the orchestrator over the shared node space.
Setup
The orchestrator configuration must be put in appsettings.json of the agent.
{
"HumanOS": {
"ServiceId": "D9E42C1B-3B25-4167-8820-2014F0BC2807",
"ServiceName": "Agent1",
"SharedNodeSpace": {
"Type": "HumanOS.PeMiL.MQTTMessageBus.TSharedNodeSpaceHub, HumanOS.PeMiL.MQTTMessageBus",
"Address": "localhost",
"MasterAgentOrchestratorId": "3d84402b-f65e-48f3-87e7-52c1e195b010"
}
...
}
}
The setting
MasterAgentOrchestratorId
can be different fromMasterSystemControllerId
.