This sample demonstrates eXtremeDB High Availability shared commit mode. The master application creates and populates the database, then enters a loop creating and deleting objects as it waits for connection requests from replicas. Once the "primary master" is started, a "secondary master" application is started. (Note that this sample requires just one"secondary master", otherwise the object indexes in the database will conflict). The "secondary master" runs a loop creating, updating and deleting objects. Replica applications create duplicates of the master database, synchronize them with the master database, then receive commit data from the masters and perform replication.
(Note that the eXtremeDB
mcolib
andmcoha
libraries must be configured withMCO_CFG_MULTIPROCESS_SHM_SUPPORT
in order to run this sample.)
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:
hashared_masterThen run the "secondary master":
hashared_masterThen run one or several "replica" applications:
hashared_replicaBut it is more instructive to run one instance in your development environment debugger, stepping through the code.