https://github.com/spacejam/zk-glove
command line tools for distributed orchestration and discovery
https://github.com/spacejam/zk-glove
Last synced: about 1 month ago
JSON representation
command line tools for distributed orchestration and discovery
- Host: GitHub
- URL: https://github.com/spacejam/zk-glove
- Owner: spacejam
- Created: 2015-05-21T02:09:33.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T01:41:18.000Z (about 11 years ago)
- Last Synced: 2025-10-21T06:27:50.193Z (9 months ago)
- Language: Go
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zk-glove
A small collection of command line tools for distributed orchestration, backed by zookeeper.
* *glove* is for attempting to run a command, without crossing a maximum number that may run concurrently.
* *hat* is for monitoring running commands, and performing certain actions when the membership changes, optionally only once a threshold is (re-)crossed.
Together these simple tools can facilitate a simple zk-backed service discovery mechanism. For example, you can run some caches using glove, and use hat to send changes in membership to clients.
```
Glove Usage
-data="hostname": contents of znode (for discovery)
-exec="echo yaaas": command to execute
-threshold=3: max concurrent commands
-zk="zk://127.0.0.1:2181/somedir": zookeeper URI
```
```
Hat Usage
-delim=",": delimiter of node contents
-exec="echo node data:{}": command to execute, {} is replaced with delimiter-separated znode data
-hardLimit=true: only run command when threshold is reached with different members
-pollFreq=30: zk polling frequency
-pollJitter=30: zk polling random jitter
-threshold=3: max considered nodes
-zk="zk://127.0.0.1:2181/somedir": zookeeper URI
```