../pvss.htm menu.gif basics.gif

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/.

Following entries required for a distributed system:

Entry

Type

Default

Range

Meaning

[general]

distributed

bool

0

0|1

Obligatory entry. Specifies a distributed system. A distributed system needs the entry "distributed = 1" in the [general] section.

In addition, this value may be overwritten for individual managers.

 

[ctrl_1]

distributed = 0

 

In this case the Control Manager with the number 1 cannot access DPs of other systems (DP identification is not transmitted to this manager).

[dist]

distPort

int

4777

>= 0

Specifies the port numbers which the distribution manager uses to accept connections from other systems. The default value is port = 4777. Note that you do not have to define the port numbers if your projects run on different computers. If your projects again run on the same computer you have to define the port numbers.

[dist]

distPeer

string

""

"host1[:port1][$host2[:port2]]"

distPeer =  System number

Specifies the hosts and the system number the distribution manager will connect to as a "client" (the other system is the "server"). If the other system is redundant both host names are separated by a dollar sign $.

Caution:

The order, in which the hosts are set in the config file, must always be the same. This means that if e.g. the hosts are set as follows in the data config entry:

data = "host1-1,host1-2$host2-1,host2-2"


the hosts in the distPeer config entry must be set in the same order:

distPeer = "host1[:port1][$host2[:port2]]" system number


Another order (distPeer = "host2[:port1][$host1[:port2]]" system number) causes connection failures.

[dist ]

requestIdDelay

int

0

>= 0

Time between receiving of an idnetification and the request of the next one. With this setting one can stack the distribution of the identification in the event manager, i.e. give the Event enough time to distribute one identification to all clients before the identification of the next system is requested.

example.gifExample 1

Distributed system consisting of 2 systems:

 

Figure: Distributed system consisting of 2 systems

Distributed_systems-25.png

 

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.gifExample 2

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

 

Figure: Distributed system consisting of 4 systems

Distributed_systems-26.png

 

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.gifExample 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

Distributed_systems-27.png

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

 

note.gifNOTE

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);

}

caution.gifcaution

For an empty project the system number and name can be changed by using the tool WCCOAtoolSysNames!

page_top.gif

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved