https://github.com/bbengfort/epaxos
Actor based implementation of the ePaxos consensus algorithm
https://github.com/bbengfort/epaxos
Last synced: over 1 year ago
JSON representation
Actor based implementation of the ePaxos consensus algorithm
- Host: GitHub
- URL: https://github.com/bbengfort/epaxos
- Owner: bbengfort
- License: mit
- Created: 2019-01-13T19:36:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-07T02:28:13.000Z (about 7 years ago)
- Last Synced: 2025-02-08T17:45:47.856Z (over 1 year ago)
- Language: Go
- Size: 4.18 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ePaxos
[](https://travis-ci.com/bbengfort/epaxos)
[](https://godoc.org/github.com/bbengfort/epaxos)
**Actor based implementation of the [ePaxos consensus algorithm](http://efficient.github.io/epaxos/).**
## Quick Start
To install this implementation of ePaxos on a system:
```
$ go get github.com/bbengfort/epaxos/...
```
This should install the `epaxos` command on your system. Create a configuration file that defines the peers for the network and other parameters as follows:
```json
{
"timeout": "100ms",
"aggregate": true,
"log_level": 5,
"peers": [
{
"pid": 1,
"name": "alpha",
"ip_address": "127.0.0.1",
"domain": "localhost",
"port": 3264
},
{
"pid": 2,
"name": "bravo",
"ip_address": "127.0.0.1",
"domain": "localhost",
"port": 3265
},
{
"pid": 3,
"name": "charlie",
"ip_address": "127.0.0.1",
"domain": "localhost",
"port": 3266
}
]
}
```
The configuration file can be stored as a .toml, .json, .yml, .yaml file in the following locations:
- `/etc/epaxos.json`
- `~/.epaxos.json`
- `$(pwd)/epaxos.json`
Or the path to the configuration file can be passed to the command at runtime. To run an ePaxos replica process:
```
$ epaxos serve -n alpha
```
The -n command specifies which peer configures the local replica, by default if no name is specified, then the hostname of the machine is used. To commit a command to the ePaxos log:
```
$ epaxos commit -k "key" -v "value"
```
This commits the command named "key" with the specified "value" to the log. Note that the client is automatically redirected to a leader in a round-robin fashion and requires the same configuration to connect.