GithubHelp home page GithubHelp logo

amitkp57 / raft-distributed-consensus Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 47 KB

Implementation of RAFT distributed consensus algorithm for building a distributed message queue.

Python 100.00%
raft message-queue distributed-consensus-algorithms rest

raft-distributed-consensus's Introduction

MARS

RAFT REST MESSAGE QUEUE (RRMQ)

The aim of this project is to create a distributed message queue.

  1. The system will be accessed through a REST API.
  2. State will be kept consistent between the nodes with the Raft consensus algorithm.

The Raft REST Message Queue (RRMQ) will allow users to add (PUT) and consume (GET) messages from a specific topic.

  1. PUT(topic, message) the message will be appended to the end of the topic’s message queue
  2. GET(topic) will pop the first message from the topic’s queue and return the message
  3. GET(topics) will return the list of topics
  4. PUT(topic) will create a new topic

Message queues will follow a first-in-first-out (FIFO) mode. Messages will be consumed (GET) only once by only one consumer. This implies that the nodes have to work together to ensure that not only is the queue kept consistent when messages are added (PUT), but also when messages are consumed (GET). RRMQ combines distribution, consistency, replication, fault tolerance, consensus, and messaging.

Start a node

python src\node.py config\server_config.json 0

Client

python src\message_client.py 

Test and code coverage

coverage run --source src -m pytest
coverage html

raft-distributed-consensus's People

Contributors

amitkp57 avatar

Watchers

 avatar

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.