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-rplmst
application connects to the "master" and synchronizes with the master database. At the same timehacascade-rplmst
works as a master, i.e. waits for connections from other replicas on port 20000. (Note thatWRITE
transactions 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\bin
directory.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_master
go tohacascade_rplmst
and then to the second-levelhacascade_replica
applications.But it is more instructive to run one instance in your development environment debugger, stepping through the code.