Giter Site home page Giter Site logo

raftcpp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raftcpp's Issues

Enhance Config class

  1. Add ToString() method for Config class.
  2. Add operator== and other operators for Config class.
  3. Add move constructor for Config class.
  4. Add more unit tests for Config class.

Use actor model for node.

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.

cmake compile failed

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

error

node_elect_test will crash

Env:
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

I find some bug(or not), need analysis:

  1. 166
    thread destory, but112 threads vector also destory thread. double free?
  2. node.hthis could TimerManager timer_manager_ to set end, because timer_manager_ need first free.
  3. I fix the crash in pr can work, but it canot pass test case.
    Becase I need add code in line 163
    threads[leaderFlag].join();
    nodes[leaderFlag].reset();

But it crash nodes[leaderFlag].reset(); this line.

Enhance Endpoint class

  1. Add ToString() method for Endpoint class.
  2. Add operator== and other operators for Endpoint class.
  3. Add move constructor for Endpoint class.
  4. Add unit test for Endpoint class.

Support non-reply RPC model in restrpc.

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.

Implement LogManager

  • Basic log manager processes. #144
  • RequestAppendLogs RPC -> PullLogs RPC #144
  • Use map to store logs. #144
  • Unit tests to cover log managers: Like use 2 log managers as a test.
  • CommitLogToStateMachine
  • HandleReceivedLogsFromLeader
  • TriggerAsyncDumpLogs
  • Full IT cases

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.