The goal of this effort is to play with Apache Zookeeper and see how well it works with Python and gevent. This is largely hacked together code.
A localhost Zookeeper is expected.
Create a virtualenv and source it:
$ virtualenv ~/zkproto_ve $ . ~/zkproto_ve/bin/activate
Install zkproto and dependencies into the virtualenv:
$ python setup.py develop
supervisord is used to manage the worker processes. Start it up from the zkproto source directory:
$ supervisord
Run the tests:
$ zkproto-trials
When you are done, kill supervisord:
$ supervisorctl shutdown
Using zookeeper with gevent takes some effort. I had to write a partial
wrapper client that marshals completion and watcher events to the gevent
thread using an os.pipe()
. If we use Zookeeper for real, this client will
need to be fleshed out and finished. (zookeeper_gevent.py)