GithubHelp home page GithubHelp logo

raft's People

Contributors

frankyliangg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raft's Issues

Cluster Membership

  • Create admin / server to handle cluster change
  • AddServer / RemoveServer RPC
  • Review notes / paper

Heartbeat appending to log

  • Should I append the empty message to the log?
    • Future handle this, for now just append to make logic simpler

StateMachine

  • Apply committed messages
    • Two TextViews
      • One with applied
      • One with all entries

Timeout

  • Use timer to set periodic intervals of calling
    • Delete timer and start new timer on reset
    • Read into election timeout more
    • Setup architecture for election -> placeholder for method calls
    • Read more about details

Communication

  • Is receiving message concurrent with CocoaAsyncSocket?

  • Enumerate cluster and send unicast or multicast?

  • nextIndex is dependent on which peer

  • Use dispatch queue async for each peer in append entries?

  • Delays could lead to timeout in certain nodes if method request takes too long

  • Do I need mutex for variables since multithreaded?

  • Something to try

    • Do I even need to use the "unicast" socket to send and receive or can I just use the "multicast" sockets I set up?

Variables

  • currentTerm -> init at 1
  • commitIndex
  • log array of JSON?
  • lastLogIndex
  • lastLogTerm

commitIndex

  • Go through code and add commitIndex and update when possibly

Add string in data as delimiter

Parsing messages between

  • AppendEntries RPC Request / Response

  • RequestVote RPC Request / Response

  • Heartbeat / AppendEntries Request / RequestVote Request -> Multicast

  • AppendEntries / RequestVote Response -> Unicast to leader, leader receives one at a time

Election

  • Request Vote RPC
    • Request / Response
    • Read / look at pseudocode
    • Conditions to step down / grant vote
    • Track when each variable is supposed to be modified
  • Follower, Candidate, Leader
    • In design process, think about how to separate each role

Threads

threads for receiving / sending unicast?

Receiving Message Types

  • Types

    • Redirect : Follower / Candidate receives message and redirect to leader
    • AppendEntries Request
    • AppendEntries Response
    • entry : store in log
  • TBD:

    • RequestVote Request
    • RequestVote Response

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.