Coder Social home page Coder Social logo

yakt-yet-another-kraft's Introduction

RR-Team-63-YAKt-Yet-Another-KRaft-

Repo for RR-Team 63-YAKt (Yet Another KRaft)

Distributed Key-Value Store with Raft Consensus Algorithm

This is a simple implementation of a distributed key-value store using the Raft consensus algorithm. The system consists of three components:

  1. Node: Represents a server in the distributed system. It handles Raft protocol, leader election, and key-value operations.

  2. Client: Interacts with the distributed system by making requests to the server. It supports both 'get' and 'put' operations.

  3. Server: Implements a Flask-based web server to handle client requests, participate in the Raft consensus algorithm, and maintain metadata storage.

Files

  • node.py: Implementation of the Node class that represents a server in the distributed system.

  • client.py: Client implementation for making 'get' and 'put' requests to the distributed system.

  • server.py: Flask-based server that handles client requests, participates in Raft consensus, and maintains metadata storage.

Metadata Storage

The system maintains metadata records such as RegisterBrokerRecord and TopicRecord. Metadata is stored in a key-value format, resembling the specified structure.

Usage

Starting a Server

python server.py <index> <ip_list_file>
<index>: Index of the server in the IP list.
<ip_list_file>: File containing a list of IP addresses.
Running a Client
Get Request
bash
Copy code
python client.py <address> <broker_id> <broker_host> <broker_port> <security_protocol> <rack_id> <key>
Put Request
bash
Copy code
python client.py <address> <broker_id> <broker_host> <broker_port> <security_protocol> <rack_id> <key> <value>
<address>: Server address in the format http://ip:port.
Metadata Generation
bash
Copy code
python client.py <address> <broker_id> <broker_host> <broker_port> <security_protocol> <rack_id> <key>
Metadata Storage
Metadata records are stored in a file named metadata.json.

yakt-yet-another-kraft's People

Contributors

arch2775 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.