Index of /~chrisd/projects/zookeeper
Name Last modified Size Description
Parent Directory -
Net-ZooKeeper-0.32.tar.gz 26-Mar-2009 03:26 40K
Net-ZooKeeper-0.33.tar.gz 24-Apr-2009 19:19 41K
Net-ZooKeeper-0.34.tar.gz 14-Jul-2009 16:37 41K
Net-ZooKeeper-0.35.tar.gz 15-Jul-2009 17:23 41K
mod_zk.c 29-Jun-2009 15:36 13K
mod_zk.h 29-Jun-2009 15:36 4.7K
Note:
The Net::ZooKeeper Perl module provides an interface to
the synchronous C API of Apache
ZooKeeper. As of
version 0.33 it is included in ZooKeeper trunk under
src/contrib/zkperl.
Note:
The mod_zk module provides an interface which allows other
modules to acquire and release shared ZooKeeper connection handles.
It is roughly similar in functionality to
mod_dbd
except that instead of maintaining a pool of connections to each ZooKeeper
cluster, just a single connection is maintained, which may then be
acquired and used by multiple modules simultaneously.
The zookeeper_mt multi-threaded ZooKeeper C client library
is required when compiling; for example:
apxs -c -I/path/to/zk/include -L/path/to/zk/lib -lzookeeper_mt mod_zk.c
Each httpd child process opens one ZooKeeper connection handle per
configured cluster. A ZooKeeper cluster is configured using the
ZKCluster directive, which assigns an alias for the cluster:
LoadModule zk_module modules/mod_zk.so
ZKCluster zk1 host1:7000,host2:7000,host3:9000
Other modules then use the alias (e.g., zk1) when
calling ap_zk_acquire() to acquire the relevant connection
handle.
My shared map projects include two example
modules, mod_slotmem_zk and mod_socache_zk,
which demonstrate the use of mod_zk.