greglu / zookeeper_client Goto Github PK
View Code? Open in Web Editor NEWThis project forked from emaland/zookeeper_client
Ruby wrapper for the ZooKeeper C client library
Home Page: http://github.com/myelin/zookeeper_client
License: MIT License
This project forked from emaland/zookeeper_client
Ruby wrapper for the ZooKeeper C client library
Home Page: http://github.com/myelin/zookeeper_client
License: MIT License
zookeeper An interface to the Zookeeper distributed configuration server. == License Copyright 2008 Phillip Pearson, and 2010 Twitter, Inc. Licensed under the MIT License. See the included LICENSE file. Portions copyright 2008-2010 the Apache Software Foundation, licensed under the Apache 2 license, and used with permission. == Install sudo gem install zookeeper == Usage Connect to a server: require 'rubygems' require 'zookeeper' z = Zookeeper.new("localhost:2181") Create, set and read nodes: z.create("/bacon", "text to be stored in the new node", 0) data, stat = z.get("/bacon") # => ["text to be stored in the new node"...] z.set("/bacon", "an entirely different line of text", stat.version) z.set("/bacon", "this won't work", stat.version) # CZookeeper::BadVersionError: expected version does not match actual version data, stat = z.get("/bacon") # => ["an entirely different line of text"...] z.delete("/bacon", stat.version) Create ephemeral and sequence nodes: z.create("/parent", "parent node", 0) z.create("/parent/test-", "an ordered ephemeral node", Zookeeper::EPHEMERAL | Zookeeper::SEQUENCE) # => "/parent/test-0" z.create("/parent/test-", "an ordered ephemeral node", Zookeeper::EPHEMERAL | Zookeeper::SEQUENCE) # => "/parent/test-1" Acquire locks: z.try_acquire "/parent/lock-", "content for the lock file" do |have_lock| puts have_lock ? "we have the lock" : "we don't have the lock" end
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.