Cluster_Shared

This sample demonstrates the use of shared memory in a cluster environment. (Note that several processes can be run on the same node.)

How to Run

In a console window run:

    cluster_shared 2 0

The first process for node 0 creates the cluster database in shared memory. Then, in a second console window, run:

    cluster_shared 2 0

The second process for node 0 connects to the database created by the first process. Then, in a third console window, run:

    cluster_shared 2 1

Note that only the first process (which creates the database) will print out the database content.

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

Related Topics Link IconRelated Topics