PpLorins Aurora Save

A Raft based K-V database implemented with cpp.

Project README

logo

AUR license

Table of Contents

About The Project

Aurora is a cross-platform Raft based K-V database. The basics of the current architecture is :

sys_arch

Note : The name Aurora has nothing to do with neither Apache Aurora nor Amazon aurora.

It's inspired by the raft protocol which often being known as a contrast of another widely known protocol : paxos. Aurora comes along with all of raft dominant features supported:

  • Log Replication: A two phase commit data replication solution.
  • Leader Election : A majority & term based failover solution.
  • Membership Change: A smart approach dealing with cluster topology changing.

Besides the consensus protocol, it also comes with a local storage subsystem whose idea is inspired and being the same with leveldb : to enhance blind writing operation throughput.

Last but not least, it's implemented by using the modern cpp(11/14/17) which may contributes to the popularization of the new lanaguage standards. After all, newer is probably better.

Getting Started

Project root directory explanation:

  • src : source code.
  • doc : documents.
  • bin : binaries & objects after successfully building.
  • working : running directory of aurora.
  • third_party : the third party dependencies.

Aurora has some basic components you need to firstly building before running.

Prerequisites

Create a third_party directory and build the above dependencies under that.

Note: How to build the dependencies is beyond the scope and you may need consulting the documents for each of them. Making sure the headers and libraries are correctly installed on your system. That maybe boring but can't get around.

After successfully built all the above dependencies, your working directory should looks something like this:

|-- src
|-- doc
|-- bin
|-- working
|-- third_party
    |-- boost_1_68_0
    |-- protobuf
    |-- grpc
    |-- glog
    |-- gflags
    |-- googletest

Building

Now, you are ready to compile aurora itself.

  • unix & linux & osx:
cd aurora && make -j4 BUILD_TYPE=[debug|release]

Note: some gcc versions(like gcc (GCC) 8.3.1) don't fully support std::atomic, thus you might need to install libatomic manually.

Usage

First , take a look at the configure files:

  • election.config : inner usage for election.
  • membership-change.config : inner usage for membership change.
  • topology.config : setup a cluster:
    • leader :leader node.
    • followers :follower nodes.
    • candidates :follower nodes.
    • all nodes are with format : xx.xx.xx.xx:port,like 192.168.0.100.

Only topology.config is intending to be controlled by users, the others are either managed by the system or for debugging purpose.

Second, after finish configuring topology.config, you can start a node by :

  • running command under *nix:
  cd aurora/working/
  nohup ../bin/aurora > aurora.log 2>&1 &
  • runing command under windows:
cd aurora\working\
..\aurora\working\aurora.exe

Contributing

It is strongly recommended to read the developer guide for details.

License

Distributed under the GPLv3 License. See the license file for more information.

Contact

Arthur - [email protected]

Donation

This project consumed a lot time away from the author, and if you think it helps, don't hesitate to show your generosity :moneybag: :moneybag: :moneybag:

Open Source Agenda is not affiliated with "PpLorins Aurora" Project. README Source: ppLorins/aurora
Stars
37
Open Issues
0
Last Commit
4 years ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating