Giter VIP home page Giter VIP logo

raft's People

Contributors

frankyliangg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raft's Issues

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

Heartbeat appending to log

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

Variables

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

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?

Threads

threads for receiving / sending unicast?

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

StateMachine

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

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

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

commitIndex

  • Go through code and add commitIndex and update when possibly

Cluster Membership

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

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.