Qihoo Distributed Configuration Management System
We have build another interesting proect pika. Pika is a nosql compatible with redis protocol with huge storage space. You can have a try.
QConf is a Distributed Configuration Management System!
A better replacement of the traditional configuration file. As designed, configuration items which is constantly accessed and modified should be completely separated with application code, and QConf is where it should be.
The QConf is built using CMake (version 2.6 or newer).
On most systems you can build the library using the following commands:
mkdir build && cd build
cmake ..
make
make install
Alternatively you can also point the CMake GUI tool to the CMakeLists.txt file.
To install the QConf you can specify the install prefix by setting:
cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
Set up Zookeeper servers, create or modify znode with Zookeeper Client
More information about Zookeper: ZooKeeper Getting Started Guide
Register the Zookeeper server address with QConf
vi QCONF_INSTALL_PREFIX/conf/idc.conf
# all the zookeeper host configuration.
#[zookeeper]
#zookeeper of idc 'test'
zookeeper.test=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183
echo test > QCONF_INSTALL_PREFIX/conf/localidc #assign local idc to 'test'
cd QCONF_INSTALL_PREFIX/bin && sh agent-cmd.sh start
qconf get_conf /demo/node1 # get the value of '/demo/node1'
// Init the qconf env
ret = qconf_init();
assert(QCONF_OK == ret);
// Get Conf value
char value[QCONF_CONF_BUF_MAX_LEN];
ret = qconf_get_conf("/demo/node1", value, sizeof(value), NULL);
assert(QCONF_OK == ret);
// Destroy qconf env
qconf_destroy();