Fault Tolerance

Tags: v8

In version V8Preview6, the ability to control the state of the main terminal (MT) of the group and, if necessary, transfer this role to another terminal has been introduced.

The innovation consists of the following elements:

  1. A list of standby terminals;
  2. Monitoring the state of the main terminal;
  3. The ability to reconfigure the main terminal via the API.

Details:

1) In the Syrve Office application, in the Settings of the trading enterprise => group settings, you can specify a list of standby terminals. These terminals will serve as backup terminals that can take on the role of MT if necessary. The form for specifying standby terminals looks as follows:

ext_number

In the API, the interface ITerminalsGroup has been updated with the list StandbyTerminals, which contains the list of standby terminals specified in Syrve Office. To get information about the current group of terminals, you can use the method GetHostTerminalsGroup or subscribe to the notification TerminalsGroupChanged.

2) Each subordinate terminal (ST) monitors the connection state with the MT, and if the state changes, the terminal will report it. For this purpose, a new notification ConnectionToMainTerminalChanged has been added. This notification conveys the connection state: true - connection to the MT is established, false - connection to the MT is lost.

3) A new operation ChangeGroupMainTerminal has been introduced in the API, allowing the change of the MT. To perform this operation, you must have permission to carry out dangerous operations (F_DOP) and pass as an argument a terminal that is a standby. After executing this operation, the passed terminal becomes the MT, and the former MT is moved to the list of standby terminals.

Example:

private static void ChangeGroupMainTerminal(IOperationService os)
{
	var newMainTerminal = os.GetHostTerminalsGroup().StandbyTerminals.First();
	os.ChangeGroupMainTerminal(os.GetCredentials(),newMainTerminal);
}

Currently, to use this innovation, you must have license 21053302. This license also removes the 30-second delay when restarting SyrveFront.