The value synchronization service provides startup synchronization of all registered variables. It also provides synchronization on a new online tag creation. In the case of online tags, the values are always synchronized with those on the Primary server for the service.
Other notes:
• The service supports clients of clients.
• You need to explicitly RPC the value, unlike NetworkValues.
• You need to explicitly persist the value, again unlike NetworkValues.
There are two synchronization situations:
1) Start-up Synchronization:
When a Client comes online or re-syncs with a Server, it will get the Primary server’s version of the variables.
2) Online Tag Synchronization:
The value a tag has when it ‘comes alive’ on the primary server will be the value that is synchronized to all workstations. Two examples will help illustrate this:
Example 1: A new counter tag is created on the server but not updated to clients. Through the course of normal operation, its value reaches 10. Now, an update is performed and the server sends it and its value to all workstations in the application. Since the value was 10 on the server, that is the value that is sent to all workstations with the new tag.
Example 2: A new tag is created on a workstation which is a client. Through the course of normal operation, its value reaches 10. Now, an update is performed and the tag ‘comes alive’ on the server. Since this is a new tag on the server, its value will be initialized at 0(*) and 0 will be the value that is sent to all workstations including the one where the tag was first created.
(*) This behavior is by design since, until a tag has been registered on the server, it is not considered to be an active part of the application.
In both examples, the convention is that all machines will synchronize from the primary server's values, regardless of who actually created the tag first.