Skip to content

Latest commit

 

History

History
81 lines (47 loc) · 2.5 KB

README.md

File metadata and controls

81 lines (47 loc) · 2.5 KB

Raft Consensus Algorithm

Overview

Raft is a consensus algorithm for managing the replicated log over a cluster of servers in a consistent state. This project is an implementation of the Replicated Key-Value Store on top of the Raft Consensus Protocol. This repository contains the assignments for the course "CS-733 Engineering the Cloud- Advanced Distributed Computing" offered at IIT Bombay.

Project Structure

The project at its core has two parallels, one is the Raft side and other is the Key-Value Store. These parallels run as Go-routines and communicate among themselves via channel. The complete description of the Raft package can be found here.

Execution Instructions

To build the project use following command.

go get github.com/pankajrandhe/cs733/assignment4/

To test the project execute the following command.

go test github.com/pankajrandhe/cs733/assignment4 -v

Usage

Following are the commands which Key-Value store accepts from the client.

  • SET command

    set <key> <exptime> <numbytes> [noreply]\r\n

    <value bytes>\r\n

    Server responds with:

    OK <version>\r\n

  • GET command

    get <key>\r\n

    Server responds with:

    VALUE <numbytes>\r\n

    <value bytes>\r\n

  • GETM command

    getm <key>\r\n

    Server responds with:

    VALUE <version> <exptime> <numbytes>\r\n

    <value bytes>\r\n

  • CAS command

    cas <key> <exptime> <version> <numbytes> [noreply]\r\n

    <value bytes>\r\n

    Server responds with:

    OK <version>\r\n

  • DELETE command

    delete <key>\r\n

    Server responds with:

    DELETED\r\n

BUGS

  • The project has not yet been tested for the log-reapair test cases.

References