Leader election implementation on top of ZooKeeper