purecpp-org / raftcpp Goto Github PK
View Code? Open in Web Editor NEWA RAFT implementation to help build your RAFT service in 1 minute.
A RAFT implementation to help build your RAFT service in 1 minute.
ToString()
method for Config
class.operator==
and other operators for Config
class.Config
class.Config
class.There is no DEBUG level in nanolog.
HandleRequestPreVote
will be clearer.
Since node is a FSM, it's better to use actor model to avoid any lock. Not only for performance, but also for easy to write.
Under the implementation, we can use a concurrentqueue for task pending.
Implement the operator<< in TermID
RAFTCPP_LOG(RLL_INFO) << node_id; will be error
I git clone raftcpp and build project by following readme, but I got this error:
ENV:
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Linux aliyun 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:11 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Env:
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
I find some bug(or not), need analysis:
TimerManager timer_manager_
to set end, because timer_manager_ need first free. threads[leaderFlag].join();
nodes[leaderFlag].reset();
But it crash nodes[leaderFlag].reset();
this line.
as titile
We can't pass node_elect_test all the time.
node_elect_test is complex, simplify it.
int main() {
RAFTCPP_CHECK(false);
// this line shouldn't be reached.
}
RAFTCPP_CHECK(false) should crash the process by design. But now it cannot. The process will exit normally, which is a bug.
Use lock free queue in boost to implement the LogManagerLockFreeImpl class.
maybe it's better to use cmake by default now.
https://github.com/topcpporg/raftcpp/blob/master/src/common/timer.cc#L7
We should use modern C++ random
instead of rand()
There are 2 gitsubmodules: asio and rest_rpc.
We should move them to cmake dependencies.
Currently, NodeID and TermID are not able to be used in unordered map as key type.
So that we can use the slice in all of our code.
Currently, we use request-response RPC model to transport data, which is not a good usage because the state of node is dynamically and we have no need use reply.
For example, if nodeA is leader, it should post logs to other nodes, and once it became to a follower it should be a receiver of RPC.
In this proposal, we shouldn't define any response for each request.
This issue traces that the part of leader election.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.