Index of /~chrisd/projects/zookeeper

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]Net-ZooKeeper-0.32.tar.gz2009-03-26 03:25 40K 
[   ]Net-ZooKeeper-0.33.tar.gz2009-04-24 19:19 41K 
[   ]Net-ZooKeeper-0.34.tar.gz2009-07-14 16:35 41K 
[   ]Net-ZooKeeper-0.35.tar.gz2009-07-15 17:13 41K 
[TXT]mod_zk.c2009-06-29 15:39 13K 
[TXT]mod_zk.h2009-06-29 15:39 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.