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
     

This first process for node 0 will create the cluster database in shared memory. Then in a second console window run:

     
    cluster_shared 2 0
     

This second process for node 0 will connect 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