Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325928

Summary: Provide FailoverMonitor server and FailoverAgents to coordinate fail-over scenarios
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 Keywords: noteworthy
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: Power to the People
Bug Depends on: 203167    
Bug Blocks: 325721    

Description Eike Stepper CLA 2010-09-22 04:00:31 EDT
Currently the fail-over management involves manual interaction with the FailoverParticipants, in particular the call to backup.setType(MASTER) after the former master has become unavailable.

We need to provide a FailoverMonitor network facility that coordinates multiple FailoverParticipants (2 or more) by communicating to a FailoverAgent per FailoverParticipant.

The FailoverMonitor is also supposed to automatically manage the connection details of the backup synchronizers and all the clients in the network, so that all nodes only need to know the FailoverMonitor connection details.
Comment 1 Eike Stepper CLA 2010-09-22 04:08:35 EDT
New monitoring framework:

org.eclipse.emf.cdo.server.internal.net4j.syncing.FailoverMonitor
org.eclipse.emf.cdo.server.internal.net4j.syncing.FailoverAgent

Updated examples:

org.eclipse.emf.cdo.examples.server.FailoverExample.Monitored.Monitor
org.eclipse.emf.cdo.examples.server.FailoverExample.Monitored.Agent1
org.eclipse.emf.cdo.examples.server.FailoverExample.Monitored.Agent2

Committed to HEAD
Comment 2 Eike Stepper CLA 2010-09-22 04:21:59 EDT
I've moved FailoverMonitor and FailoverAgent to the public org.eclipse.emf.cdo.server.net4jpackage because the agent is abstract and needs to be subclassed.
Comment 3 Eike Stepper CLA 2010-09-23 03:26:14 EDT
Clients can now also participate in the monitored failover scenarios by using a new session configuration type:

	CDONet4jUtil.createFailoverSessionConfiguration(String, String, IManagedContainer)

The sessions created by this configuration will detect server/network failure (as usual) and (new) query the failover monitor for the new master connection details, connect to that master and reregister all existing views with the new master. 
	
An example is in org.eclipse.emf.cdo.examples.server.FailoverExample.Monitored.Client.main(String[])

Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:41:25 EDT
Available in R20110608-1407