Aurora is a cross-platform Raft based K-V database. The basics of the current architecture is :
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.
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.
- protobuf. >=3.0.0.
- grpc. >=1.8.x.
- boost. >=1.64.0.
- glog. >=0.3.3.
- gflags. >=2.2.0.
- gtest. >=1.7.0.
- gperftools. >=7.0.
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
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.
- windows: see building under windows
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
,like192.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
It is strongly recommended to read the developer guide for details.
Distributed under the GPLv3 License. See the license file for more information.
Arthur - [email protected]
This project consumed a lot time away from the author, and if you think it helps, don't hesitate to show your generosity 💰 💰 💰
-
paypal: paypal.me link
-
wechat:
-
alipay: