You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.5 KiB

# Debian systems
## Build Dependency:
```
build-essential liblz4-dev libuv1-dev shellcheck autoconf libtool
```
## Building Script
```
git clone https://github.com/canonical/raft
cd raft
autoreconf -i
```
Download configure script [configure_debian](../../../raw/branch/main/configure_debian)
```
bash configure_debian
make
```
## Build debian packages (.deb)
Download build script [build-deb](../../../raw/branch/main/build-deb)
```
bash build-deb
```
[![CI Tests](https://github.com/canonical/raft/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/canonical/raft/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/canonical/raft/branch/master/graph/badge.svg)](https://codecov.io/gh/canonical/raft) [![Documentation Status](https://readthedocs.org/projects/raft/badge/?version=latest)](https://raft.readthedocs.io/en/latest/?badge=latest)
Fully asynchronous C implementation of the Raft consensus protocol.
The library has modular design: its core part implements only the core Raft
algorithm logic, in a fully platform independent way. On top of that, a
pluggable interface defines the I/O implementation for networking (send/receive
RPC messages) and disk persistence (store log entries and snapshots).
A stock implementation of the I/O interface is provided when building the
library with default options. It is based on [libuv](http://libuv.org) and
should fit the vast majority of use cases. The only catch is that it currently
requires Linux, since it uses the Linux
[AIO](http://man7.org/linux/man-pages/man2/io_submit.2.html) API for disk
I/O. Patches are welcome to add support for more platforms.
See [raft.h](https://github.com/canonical/raft/blob/master/include/raft.h) for full documentation.
License
-------
This raft C library is released under a slightly modified version of LGPLv3,
that includes a copyright exception letting users to statically link the library
code in their project and release the final work under their own terms. See the
full [license](https://github.com/canonical/raft/blob/LICENSE) text.
Features
--------
This implementation includes all the basic features described in the Raft
dissertation:
- Leader election
- Log replication
- Log compaction
- Membership changes
It also includes a few optional enhancements:
- Optimistic pipelining to reduce log replication latency
- Writing to leader's disk in parallel
- Automatic stepping down when the leader loses quorum
- Leadership transfer extension
- Pre-vote protocol
-------------
[Source Code](../../../../raft)