We have a mainserver and a “standby” server. Focus is always on the mainserver. As long the mainserver is available - the client only may communicate with that one. Even if the standby server is online. Just if the mainserver (ROService) is offline client has to connect to the standby one (if available). So far i’ve created two channels and for each service two service interfaces.
FROMainChannel := TROSynapseSuperTCPChannel.Create(nil);
FROMainChannel.AutoReconnect := true;
FROMainChannel.Host := '';
FROMainChannel.Port := 8099;
FROMainChannel.SynchronizeEvents := true;
FROMainChannel.OnConnected := OnMainChannelConnected;
FROMainChannel.OnDisconnected := OnMainChannelDisconnected;
FROMainMessage := TROBinMessage.Create;
FROMainAppService := CoVideoAppServiceV3.Create(FROMainMessage, FROMainChannel);
FROMainPtzService := CoPtzService.Create(FROMainMessage, FROMainChannel);
FROMainMailService := CoMailService.Create(FROMainMessage, FROMainChannel);
FROMainSwitchService:= CoSwitchGroupMgmt.Create(FROMainMessage, FROMainChannel);
FROMainWallService := CoWallSwitchGroupMgmt.Create(FROMainMessage, FROMainChannel);
Same as above for the second channel. Depending on the available connections one or the other service has to be used. Would it be possible to use just one channel somehow with the serverlocator to match this requirement?