Configuration file for distributed systems

This chapter describes the necessary entries that are generated automatically when creating a distributed project (see also Creating a distributed system). The entries are set in the config file located in proj_path/config/.

Refer to Dist Manager [dist] and General settings [general] for further information on entries required for a distributed system.

Note:

If the system number is changed in an NGA project that was already running once, on first start of the project after changing the system number, the following messages are shown:

WCCOAnextgenarch(118), 2021.10.07 11:00:07.985, IMPL, SEVERE, 69, Database error, Could not convert value to influx line because the variable 'System1:_ReduManager.ErrorChangeReason' has no entry inside the metadata table (from _NGA_B_InfluxDB)

WCCOAnextgenarch(118), 2021.10.07 11:00:07.997, IMPL, SEVERE, 69, Database error, Could not convert value to influx line because the variable 'System1:_ReduManager.MyErrorStatus' has no entry inside the metadata table (from _NGA_B_InfluxDB)

WCCOAnextgenarch(118), 2021.10.07 11:00:08.008, IMPL, SEVERE, 69, Database error, Could not convert value to influx line because the variable 'System1:_ReduManager.MyErrorStatusRemote' has no entry inside the metadata table (from _NGA_B_InfluxDB)

WCCOAnextgenarch(118), 2021.10.07 11:00:08.020, IMPL, SEVERE, 69, Database error, Could not convert value to influx line because the variable 'System1:_ReduManager.ErrorChangeReason' has no entry inside the metadata table (from _NGA_B_InfluxDB).

Example 1

Distributed system consisting of 2 systems:

Figure: Distributed system consisting of 2 systems

In order to create a distributed system containing two different systems connected with each other (System1 and System2) following entries are necessary on the two systems:

System1 (Host name Host1):

[general]

distributed = 1

#The System1 does not need any distPeer entry since it is a server for the System2

System2 (Host name Host2):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

Example 2

Distributed system consisting of 4 systems, all connected to each other:

Figure: Distributed system consisting of 4 systems

In order to create a distributed system containing four different systems (System1, System2, System3 and System4 ) the following entries are necessary (in this example System4 is server for all other systems, System3 is client to System4 and server for System1 and System2. System2 is client to System3 and System4 and server for System1. System1 is client to all other systems):

System1 (Host name Host1):

[general]

distributed = 1

[dist]

distPeer = "Host2" 2 #Connect to Host2 (of System2), system number 2

distPeer = "Host3" 3 #Connect to Host3 (of System3), system number 3

distPeer = "Host4" 4 #Connect to Host4 (of System4), system number 4

System2 (Host name Host2):

[general]

distributed = 1

[dist]

distPeer = "Host3" 3 #Connect to Host3 (of System3), system number 3

distPeer = "Host4" 4 #Connect to Host4 (of System4), system number 4

System3 (Host name Host3):

[general]

distributed = 1

[dist]

distPeer = "Host4" 4 #Connect to Host4 (of System4), system number 4

System4 (Host name Host4):

[general]

distributed = 1

Example 3

Distributed system (containing 7 different systems) with a hierarchical structure

(All systems are connected to System1. System5 is connected to System2 and System 6 and 7 are connected to System3).

In a hierarchical structure the best solution is that the top-level system is server for all other systems, the bottom-level systems are clients to all other systems and the medium-level systems are servers for all systems below and clients to all system above. This has two advantages: you need less config entries and if you add "lower-level" systems you do not have to change the config file of the "higher-level" systems (and therefore you do not have to restart the "higher-level" systems).

Figure: Distributed system consisting of 7 systems

System1 (Host name Host1):

[general]

distributed = 1

The System 1 does not need any distPeer entry since it is a server.

System2 (Host name Host2):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

System3 (Host name Host3):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

System4 (Host name Host4):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

System5 (Host name Host5):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

distPeer = "Host2" 2 #Connect to Host2 (of System2), system number 2

System6 (Host name Host6):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

distPeer = "Host3" 3 #Connect to Host3 (of System3), system number 3

System7 (Host name Host7):

[general]

distributed = 1

[dist]

distPeer = "Host1" 1 #Connect to Host1 (of System1), system number 1

distPeer = "Host3" 3 #Connect to Host3 (of System3), system number 3

You can change the system number and name of an existing project by using the WCCOAtoolSyncTypes. Note that the project is stopped and start WCCOAtoolSyncTypes via the command line as follows:

WCCOAtoolSyncTypes -system 3 newSysName -proj "Demo_3.5"

As shown above, specify first the system number and then the system name.

The system number and name can be queried in CONTROL via the functions getSystemName() and getSystemId():

main()

{

int sysId;

string sysNam;

sysNam = getSystemName();

DebugN("NAME IS:",sysNam);

sysId=getSystemId(sysId);

DebugN("ID IS:",sysId);

}