https://github.com/dannote/mod-ndb
Automatically exported from code.google.com/p/mod-ndb
https://github.com/dannote/mod-ndb
apache-module c mysql-cluster ndb rest-api
Last synced: 4 days ago
JSON representation
Automatically exported from code.google.com/p/mod-ndb
- Host: GitHub
- URL: https://github.com/dannote/mod-ndb
- Owner: dannote
- Created: 2015-07-03T20:47:38.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-03T20:50:12.000Z (almost 11 years ago)
- Last Synced: 2026-04-27T16:38:59.685Z (about 2 months ago)
- Topics: apache-module, c, mysql-cluster, ndb, rest-api
- Language: C++
- Size: 3.12 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 37
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This is mod_ndb, an Apache module that provides a REST Web Services API for
MySQL Cluster.
--- BUILDING THE MODULE ---
MySQL Cluster and Apache must be installed, including all header files and
shared libraries.
# ./configure --mysql=/path/to/mysql_config --apxs=/path/to/apxs
# make
Note that this configure script is not GNU Autoconf (which is not required,
since it has already been run to build MySQL), but rather a small script which
can use the "mysql_config" and "apxs" commands to generate an appropriate
Makefile for mod_ndb.
---- BUILDING ON Red Hat Enterprise Linux and similar ----
1) Install httpd-devel using yum
2) Install the MySQL-Cluster-gpl-devel RPM from dev.mysql.com/downloads
3) Configure mod_ndb with: ./configure --apxs=/usr/sbin/apxs
4) make
5) See below to start the server and then run the test suite
--- STARTING THE SERVER ---
1) You will need some [API] node ids in your MySQL Cluster configuration --
one for each httpd process.
Add these to the cluster configuration file (config.ini) and restart your
management server.
You should be able to run the test suite succesfully with ten of these, even
using a "prefork" MPM. But for production use, a multi-threaded MPM such as
"worker" is recommended.
2) Read over and edit the file "test.conf". At a minimum, set
ndb-connectstring to point to your cluster management server
3) Type "make start" to start a test httpd server that includes mod_ndb.
"make stop" will stop the server.
Note the server error log file -- logs/ndb_error_log
4) Apache must be able to load several NDB and MySQL libraries from
the mysql lib directory (e.g. /usr/local/lib/mysql); if the server will not
start up due to a failure here, you may need to set LD_LIBRARY_PATH.
5) If the server starts and attempts to initialize mod_ndb, there will be
one or more notices in the Apache server log file, such as
[notice] Cannot connect to NDB Cluster
-- indicating failure, or a succesful notice like:
[notice] Process 457 connected to NDB Cluster as node 5
--- USING THE TEST SUITE ---
% cd Tests
% . lib.test.sh
# Run the SQL queries to create the test database
% vi Tests/my.cnf # set the hostname
% t.sql
# Run all tests
% t.test
# Run a single test
% t.test typ101
--- OTHER BUILD NOTES FOR VARIOUS PLATFORMS ---
If you have a thread-safe mysql client library, configure mod_ndb with --thread-safe
On 64-bit linux you may need to build MySQL with
CFLAGS=-fPIC ./configure --with-ndbcluster --with-pic=yes
to avoid a linker error
--- FURTHER DOCUMENTATION ---
More documentation is available at:
http://forge.mysql.com/wiki/ProjectPage_mod_ndb
Enjoy!
John David Duncan
jdd@sun.com