https://github.com/ibawt/tabby
An functional experiment in Raft & Clojure
https://github.com/ibawt/tabby
clojure functional-programming raft
Last synced: 16 days ago
JSON representation
An functional experiment in Raft & Clojure
- Host: GitHub
- URL: https://github.com/ibawt/tabby
- Owner: ibawt
- License: epl-1.0
- Created: 2015-02-02T00:53:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-01-13T16:16:41.000Z (about 8 years ago)
- Last Synced: 2023-03-24T02:08:24.303Z (almost 3 years ago)
- Topics: clojure, functional-programming, raft
- Language: Clojure
- Homepage:
- Size: 201 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tabby
[](https://travis-ci.org/ibawt/tabby)
[](https://coveralls.io/github/ibawt/tabby)
[](https://clojars.org/tabby)
Tabby is an implementation of the Raft consensus algorithm.
## Features
- REPL based development
- Leadership Election
- Log Replication
## Database
The database is just a key value store with support for the following operations:
- set key value
- get key
- compare-and-swap key new old
## Client Libraries
There is only one client at this time and it's written in clojure in this repo in the `client` namespace.
## Building
script/build
## Running
There are a few ways to run`tabby`
1. Kubernetes:
There are some example yamls in the 'k8s' directory.
2. Command line:
For each peer machine run tabby like this:
`java -jar $TABBY_JAR --id $ME --peers $PEER_STRING --data-dir $DATA_DIR`
- $ME: The ID of peer in question
- $PEER_STRING: A comma separated list of peers in the format of :=
e.g. "tabby-0:7659=0,tabby-1:7659"
NOTE: tabby will prune itself out of the peer list
- $DATA_DIR: Where tabby should store it's replicated log.
Ideally run this with a daemonizer, like systemd or whatever.
## TODO
- [ ] Fix inconsistent jepsen results
- [ ] HTTP client API
- [ ] HTTP health checks
- [ ] Prometheus Metrics
## Jespsen testing
1. Clone the jepsen repo
2. Copy the ./jepsen directory into the jepsen repo
3. Turn up jepsen, ( I use the docker one )
4. Enter the control node
5. Go into the 'tabby' subdirectory
6. `lein run test --concurrency 10`
## License
Copyright © 2015 Ian Quick
Distributed under the Eclipse Public License either version 1.0 or any later version.