I presume you are talking about servers on a collective, right?
If that's the case, please refer to the High Availability section in the PI-SDK Help, which provides a thorough explanation of the HA features available:
Suppose we have connected to Server A and listening to events change. In between Server A goes down. Then we need to automatically connect to server B. Same if server B goes down, we need to connect to server C.
For these requirements, you would be covered by the PreferPrimary option of the Server.Open method.
in between if server A goes up, then system should be reconected to server A.
For this requirement, you would have to implement a custom periodic check that server A is up and force reconnection to it.
Please let us know ow we can achieve such result in OnNewVale method of event pipes. Has PI SDK in built support for this type of pooling?
Note that during a failover, signups for change notification (EventPipes) on one server need to be reestablished on the next server. During the transition period some events can be missed. Also because replication is not instantaneous and because data delivery is fanned from input sources and there is latency (or even disconnection and buffering) between the data source and the server, the data streams between the initial connection and the new connection after a failover may not be perfectly synchronized. For example, after failing over, the new server may not yet have seen data that was already delivered to the first server resulting in duplicate data arriving in EventPipes. When the new server is ahead of the original server events that had not yet been delivered to the original EventPipe are already on the new server and aren't sent again. This can result in a gap in the event stream in an EventPipe. However, the archive of both servers eventually has the same complete history. This behavior can be observed in ProcessBook when during a failover a gap is displayed but on refreshing the data from the new server, a continuous trace is displayed.
Thanks Daniel for the detailed help.
As I am using serverManager object to create the connections, will this collective interface work with servermanager?
Can you provide me any code samples how to work with collective interface with servers.