insightsdev / zookeeper-leader-election Goto Github PK
View Code? Open in Web Editor NEWThis project forked from perezrathke/zookeeper-leader-election
A simple library for Apache ZooKeeper leader election
This project forked from perezrathke/zookeeper-leader-election
A simple library for Apache ZooKeeper leader election
Author: Alan Perez-Rathke ([email protected]) This is a simple implementation of the ZooKeeper leader election algorithm as outlined here: http://zookeeper.apache.org/doc/trunk/recipes.html#sc_leaderElection Classes: *ZooElectableClient: - An abstract ZooKeeper client that implements the leader election algorithm. - The method performRole() must be implemented in a child class. This function is intended to contain the work that the client node must actually perform (conditioned on whether or not it is the leader). *ZooTestElectableClient: - A simple demo ZooKeeper client that simply outputs its state after any leader election. *ZooZNodeDeletionMonitor: Based on http://zookeeper.apache.org/doc/current/javaExample.html#ch_Introduction - A monitor that watches for znode deletion and informs its listener when this occurs Scripts (*nix): ./build.sh - will compile the java sources ./run.sh - will run an instance of the test client Usage: The clients assume that a server is running in the background. See: http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html for documentation on downloading and starting a ZooKeeper server. To demo, run multiple client instances (each in separate terminal windows), then kill the leader instance to observe a new leader election.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.