Skip to content

shuntan/libzookeeper_master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zookeeper - the Apache Zookeeper C/C++ client library

Copyright (c) 2016-2017, Shun Tan.

https://github.com/shuntan/libzookeeper_master

Gitter chat Build status

libzookeeper is a C library implementation of the Apache Zookeeper protocol, ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

For an introduction to the performance and usage of libzookeeper_master, see INTRODUCTION.md

See the wiki for a FAQ.

NOTE: The master branch is actively developed, use latest release for production use.

#Overview#

  • Support Session Expired automatic reconnection
  • Synchronous and asynchronous mechanism
  • High-level balanced ZooKeeper (requires version >= 3.4.5)
  • Simple (legacy) client
  • Simple package for monitor
  • Stable C & C++ APIs (ABI safety guaranteed for C)
  • Statistics metrics
  • Debian package: libzookeeper and libzookeeper-dev in Debian and Ubuntu
  • RPM package: libzookeeper and libzookeeper-devel
  • Portable: runs on Linux, OSX, Win32, Solaris, FreeBSD, ...

#Language bindings#

#Users of libzookeeper#

Usage

Requirements

The GNU toolchain
GNU make
CMAKE 
pthreads
libzookeeper_mt (main)
zlib (optional, for gzip compression support)
libsasl2-dev (optional, for SASL GSSAPI support)
liblz4-dev (optional, for LZ4 compression support)

Instructions

Building

Source:
	cmake -DCMAKE_INSTALL_PREFIX=<installation directory> .
	make && make install
example:
	cmake .
	make

NOTE: See README.win32 for instructions how to build on Windows with Microsoft Visual Studio.

Usage in code

See examples/example.cpp for an example master slave switch.

Link your program with -llibzookeeper -llibzookeeper-mt.a -lz -lpthread -lrt.

Documentation

The public APIs are documented in their respective header files:

To generate Doxygen documents for the API, type:

make docs

For a zookeeper introduction, see INTRODUCTION.md

Examples

See the examples/sub-directory.

Tests

See the tests/sub-directory.

Support

File bug reports, feature requests and questions using GitHub Issues

Questions and discussions are also welcome on irc.freenode.org, #apache-zookeeper, nickname Snaps.

Commercial support

Commercial support is available from Domain services

About

a C library implementation of zookeeper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published