Giter VIP home page Giter VIP logo

raft-kv's Introduction

raft-kv

Go Report Card License Build

English | 中文

Introduction

A simple key-value store with raft consensus algorithm.

Features

RESP

"RESP is a binary protocol that uses control sequences encoded in standard ASCII. The A character, for example, is encoded with the binary byte of value 65. Similarly, the characters CR (\r), LF (\n) and SP ( ) have binary byte values of 13, 10 and 32, respectively. The \r\n (CRLF) is the protocol's terminator, which always separates its parts."

RESP data type Minimal protocol version Category First byte
Simple strings RESP2 Simple +
Simple Errors RESP2 Simple -
Integers RESP2 Simple :
Bulk strings RESP2 Aggregate $
Arrays RESP2 Aggregate *

Running

start the server

go run main.go

cd to the kvsctl directory and run the following commands to interact with the server.

go build -o kvsctl

# Get and Set
./kvsctl GET name
# you can also specify the address of the server
# if you want to change the default address of the server
# you can modify the `kvsctl` file
./kvsctl GET name -a 127.0.0.1:2317

# Raft Cluster 
./kvsctl member add 127.0.0.1:2317 127.0.0.1:2318
./kvsctl member remove 127.0.0.1:2317
./kvsctl member list

Supported commands

Reference

raft-kv's People

Contributors

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