High Availability Data Concept

By High Availability (HA), we do not mean full redundancy, but something that is close and in many situations serves the same purpose adequately.
In short, the HA provided by this module, will be like described below. There are 2 Hive instances involved; one local instance and one remote instance.

Configration Data

For now, synchronizing configuration data is not supported, and is required to be synchronized manually.

TimeSeries data

TimeSeries data will be synchronized like this: When your local Hive instance starts, the HAGovernor will request all items that are trended locally from the local instance. For each of these items, it will try to retrieve from the remote instance timeseries data from the time period when the local instance was not running. All timeseries data received from the remote instance, will be inserted into the corresponding timeseries data of the local instance. If any (for some reason) timeseries data already exists locally for the time period when your local instance was not running, it will be overwritten.

Event data

Event data will be synchronized like this: When your local Hive instance starts, the HAGovernor will request all event data from the remote instance, from the time period when the local instance was not running. All Event data received from the remote instance, will be inserted into the event data of the local instance. If any (for some reason) event data already exists locally for the time period when your local instance was not running, it will be not be overwritten.

State items

It is possible to track the state of the synchronization using the DeputyState, LastUpToDate and SyncState state items.

When the module starts up, each deputy will go through a synchronization process from idle to finished, and can be tracked with the DeputyState state item.

The following values apply for DeputyState:

StateValue
idle0
started1
waiting_for_connection2
sending_sync_request3
waiting_for_reply4
finished_ok5
finished_with_error6

LastUpToDate is the timestamp of last successfull synchronization, i.e. should be same as the timestamp of DeputyState last time it transitioned to finished_ok. SynchState shows info and error messages generated during the synchronization process, i.e. when the DeputyState is transitioning from idle to finished.

Also, please refer to this section: Apis High Availability.