To run this example the Oracle Coherence Incubator must be built and installed locally. Instructions on how to achieve this are located here: Building the Oracle Coherence Incubator.
The source code for this example is located in the coherence-pushreplicationpattern-examples
module of the Oracle Coherence Incubator.
This example demonstrates Push Replication Pattern configured in an "Active-Active" topology, where by two or more clusters use applications that simultaneously perform update operations on the same values. These values are concurrently replicated and merged between the said clusters.
There are four applications to run as part of this example. The following details the intent, instructions and the order in which to run these applictions.
The following instructions assume that
$COHERENCE_INCUBATOR
is the directory in which the Oracle Coherence Incubator source code has been downloaded, unpacked and built according to the prerequisites outlined above.
Execute the following shell commands to start the "Active Server for Site 1".
In a new Terminal / Shell Console for the "Active Server for Site 1"
Change to the Push Replication Pattern Examples directory.
cd $COHERENCE_INCUBATOR/coherence-pushreplicationpattern-examples/target
Run the "Active Server for Site 1"
java -jar coherence-pushreplicationpattern-examples-12.6.1.jar activeactive-active1-server.properties
Execute the following shell commands to start the "Active Server for Site 2".
In a new Terminal / Shell Console for the "Active Server for Site 2"
Change to the Push Replication Pattern Examples directory.
cd $COHERENCE_INCUBATOR/coherence-pushreplicationpattern-examples/target
Run the "Active Server for Site 2"
java -jar coherence-pushreplicationpattern-examples-12.6.1.jar activeactive-active2-server.properties
Execute the following shell commands to start the "Active Publisher for Site 1". This application will insert and update entries in the "Active Server for Site 1", that of which will then "push" said updates to the "Active Server for Site 2" where they will be merged.
In a new Terminal / Shell Console for the "Active Publisher for Site 1"
Change to the Push Replication Pattern Examples directory.
cd $COHERENCE_INCUBATOR/coherence-pushreplicationpattern-examples/target
Run the "Active Publisher for Site 1"
java -jar coherence-pushreplicationpattern-examples-12.6.1.jar activeactive-publisher1.properties
Execute the following shell commands to start the "Active Publisher for Site 2". This application will insert and update entries in the "Active Server for Site 2", that of which will then "push" said updates to the "Active Server for Site 1" where they will be merged.
In a new Terminal / Shell Console for the "Active Publisher for Site 2"
Change to the Push Replication Pattern Examples directory.
cd $COHERENCE_INCUBATOR/coherence-pushreplicationpattern-examples/target
Run the "Active Publisher for Site 2"
java -jar coherence-pushreplicationpattern-examples-12.6.1.jar activeactive-publisher2.properties
After running both publisher applications, the clusters will have the same values.