|
Introduction
Spread Toolkit
Examples
Download
Install
API Reference
Comparison
Details
|
|
|
- Install MySQL
- The mysql_config script and MySQL's C and C++ header files
are required for building the Message API.
- Install and configure Spread
- It's available from spread.org.
Before using the Message API, you should have a working spread.conf file
and running Spread daemons, and you should be able to use the spuser
utility to send a test message.
- Download and unpack the Message API source distribution
- From the downloads page
- Run configure, make, and make install
- This will create a file called message_api.so and install it in
/usr/local/lib/.
- Create the SQL functions
- Execute the create_functions.sql script in your MySQL server
CREATE FUNCTION send_mesg RETURNS INTEGER soname 'message_api.so';
CREATE FUNCTION join_mesg_group RETURNS INTEGER soname 'message_api.so';
CREATE FUNCTION recv_mesg RETURNS STRING soname 'message_api.so';
CREATE FUNCTION leave_mesg_group RETURNS INTEGER soname 'message_api.so';
CREATE FUNCTION track_memberships RETURNS INTEGER soname 'message_api.so';
CREATE FUNCTION mesg_handle RETURNS INT soname 'message_api.so';
CREATE FUNCTION mesg_status RETURNS STRING soname 'message_api.so';
|