This sample demonstrates how to use cascade replication in eXtremeDB High Availability. The master application creates and populates the database, then enters a loop creating and deleting objects as it waits for connection requests from replicas. The
hacascade-rplmstapplication connects to the "master" and synchronizes with the master database. At the same timehacascade-rplmstworks as a master, i.e. waits for connections from other replicas on port 20000. (Note thatWRITEtransactions are not allowed, because it is a replica for "master".)
See instructions here on how to build this and other samples on your development platform. Once built, the sample can be run from the
\target\bindirectory.In a console window run:
hacascade_masterThen run one or several "replica" applications:
hacascade_rplmstThen run one or more "replica" applications, that connect to rplmst and synchronize with its database:
hacascade_replicaNote that the database updates from the
hacascade_mastergo tohacascade_rplmstand then to the second-levelhacascade_replicaapplications.But it is more instructive to run one instance in your development environment debugger, stepping through the code.