This sample demonstrates the use of function
mco_cluster_discover()
to determine the list of active nodes.
To run this sample open three console windows and set the eXtremeDB installation root directory as the current working directory. Then within 5 seconds:
In one console window run:
cluster_demo -n 300000 2 0and in a second console window run:
cluster_demo -n 300000 2 1This starts the cluster for a significant amount of execution time (option “
-n 300000
” forces the two cluster nodes to perform 300,000 transactions each). Then within 10 seconds run:cluster_discover localhost:20000Now sample
cluster_discover
will list the two cluster nodes created bycluster_demo
.But it is more instructive to run one instance in your development environment debugger, stepping through the code.