# HA_Shared

> 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` and `mcoha` libraries must be configured with `MCO_CFG_MULTIPROCESS_SHM_SUPPORT` in order to run this sample.)

### How to Run

> 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_master

> Then run the "secondary master":

>         hashared_master

> Then run one or several "replica" applications:

>         hashared_replica

> But it is more instructive to run one instance in your development environment debugger, stepping through the code.

Related Topics