Note: As of VTS 7.5, the \RPCManager\Register subroutine features two new parameters: ServerList and Sticky. ServerList is an optional parameter that is an array of server names for the service. If used, it overrides any server list configuration that has been done in the .INI files. If not used, the usual method of determining the server list is used (see Config.ini [RPCMANAGER-SERVERS] Section Variables and RPC Manager Configuration).
By simply changing the application configuration, you can add more potential servers to the list for our simple service. This allows you to experiment with "fail-over" from one server to another. Client workstations will automatically re-synchronize to whichever workstation is currently the highest available server.
Note: Remember that the primary server for a service is the first PC listed, and subsequent PCs are backup servers for the service. The list of servers for a service is hierarchical, and backup servers always act as clients to the primary server, unless and until they are called upon to assume the role of active server for the service.
For example, you might configure Config.ini as follows:
[System]
Page = TestSrv
SimulateIO = 0
RPCExternalConfig = 0
DispMgrHeight = 300
DispMgrFullScreen = 0
DispMgrWidth = 400
[RPCManager-Servers]
Name = FREDSPC
[Sample-Servers]
Name = FREDSPC
Name = JOESPC
Name = GONZOSPC
In this sample configuration, the section "[Sample-Servers]" specifies that the primary and backup service servers for the service named "Sample" are FREDSPC, JOESPC and GONZOSPC. These three potential servers are arranged in order of decreasing priority, with FREDSPC as the primary server for the "Sample" service, JOESPC as the first potential backup server for the service, and GONZOSPC as the second potential backup server for the service.
Note: Rather than specifying the three potential servers under a service-specific section as we have above, it is possible to list them under the [RPCManager-Servers] section. The result of doing so is that the listed servers will act as the primary and backup servers for the RPC Manager service, and for all other services that do not have their own potential server list section. In large systems, it is prudent, however, to specify different server lists for different services, as we have in the above example. Information on configuring different servers for different services can be found in Configure Separate Servers for Separate Services.
Now, the PC nearest the top of the server list for the "Sample" service that has an available service instance will be the active server for the service. If a higher-ranking workstation becomes available, the higher-ranking workstation will synchronize with the active server instance and then seize server status from the lower-ranking server. The lower-ranking server will then switch into client mode and synchronize with the new higher-ranking active server. All client workstations will also synchronize with the new active server.
For example, referring above to the potential servers for the "Sample" service, if JOESPC is the active server, and FREDSPC suddenly comes back online, FREDSPC will synchronize with JOESPC, and then will seize server status. JOESPC will then switch into client mode and synchronize with FREDSPC. All clients running the application will then synchronize with FREDSPC.
By now you may have realized that this architecture is distinct from the traditional server/client architecture, where one or two workstations were designated as server. Typically, one workstation would be the "hot" standby for the other workstation. The VTS distributed architecture allows different services to have their server instances executing on different workstations, each with different fail-over strategies. The VTS distributed architecture allows you to focus on writing solutions for your services, with minimal coding overhead to support such a versatile architecture.
The simple example above, however, is insufficient for more sophisticated needs. The following sections examine possible extensions to the above code.