
Cluster Messaging Service (cms)
		-- Linux-HA implementation of SAF AIS message service


Getting Start
=============

I suppose you have already installed and configured heartbeat. If you don't
know how to configure heartbeat, please refer documentations under top
level directory doc/ especially GettingStarted.txt.

cms depends on heartbeat and ccm (with AIS membership library wraper).


In /etc/ha.d/ha.cf, uncomment or add below 4 lines:

respawn hacluster /usr/lib/heartbeat/ccm
respawn hacluster /usr/lib/heartbeat/cms
apiauth ccm uid=hacluster
apiauth cms uid=hacluster


There you go, ccm and cms will start together with heartbeat.

$ /etc/rc.d/init.d/heartbeat start


To verify the cms daemon works, try below command:

$ /usr/lib/heartbeat/cmstools -v -c createqueue -c status -c unlink


You can almost do anything that the cms daemon provided with cmstools. See
the usage of cmstools with the -h option.




Code Map
========

Daemon:
telecom/cms/
	cms_main.c		/* heartbeat initialize and glib mainloop */
	cms_membership.c	/* membership initialize and callbacks */
	cms_entry.c		/* entry point for events both from client
				   and other cms daemons in the cluster */
	cms_client.c		/* methods talking with local client */
	cms_cluster.c		/* methods talking with other cms daemons */
	cms_mqueue.c		/* methods dealing with local mqueue table */
	cms_common.c		/* common functions for ais message service */

	cms_common.h		/* public common functions
				   -- used by all */
	cms_mqueue.h		/* public methods for mqueue table
				   -- used by cms_client.c cms_cluster.c */
	cms_data.h		/* cms daemon data and structure
				   -- used by cms_entry.c mc_client.c
				      cms_cluster.c */
	cms_membership.h	/* membership initialize functions
				   -- used by cms_main.c */


Library:
include/cmsclient.h 		/* client library header file */

lib/cmsclient/
	cmslib_client.c		/* client library */




Debugging
=========

1. To debug the cms daemon, simply start it with the -d option. The debug
   message will print to stderr.

   You can also define the DEBUG_XXX to 1 in cms_data.h to enable excessive
   debug information.

2. To debug the library, you need to compile the library with debug option,
   for exampile,

   $ DEBUG=DEBUG make



Enjoy!

Thu Jul  8 23:23:44 CST 2004
-yi

