Giter Site home page Giter Site logo

rustyrabbitdb's Introduction

RustyRabbit ๐Ÿ‡

An in-memory key value store speaking the redis language

RustyRabbit is an attempt to create a lite version of Redis supporting basic operations. Its written in Go programming language and can be installed on local system to play with. You can connect to this server using the redis-cli command.

Features

  • connect using redis-cli command
  • Basic Operations like GET, SET, LPUSH, RPUSH, DEL, INCR, DECR, SAVE
  • Provision to set TTL and expire key after TTL is passed (EX, PX, EXAT, PXAT). For usage please refer redis docs
  • Handle concurrent connections
  • Save backup of in-memory data in .rdb file using compressed format
  • Load from the backup file on startup if backup file exists

Working on this project has its own perks. You understand how to handle concurrent tcp connections and learn the language of Redis (RESP). You will also understand how to serialize and deserialize in-memory data and save and load it to and from a compressed backup file.

Setting It Up

To run rustyrabbit locally you need Go programming language installed.

git clone https://github.com/Rahul-1991/rustyRabbitDB
cd rustyRabbitDB
go run main.go

Benchmarks

Using the redis benchmark utility rustyrabbit was tested by simulating multiple clients sending commands at the same time to test concurrency. The results as tested on macbook pro M1 are given below

> redis-benchmark -p 6380 -t SET,GET -q
SET: 139082.06 requests per second, p50=0.183 msec
GET: 132802.12 requests per second, p50=0.183 msec

Contributions

Would love to have people go through my code and help in adding more features to rustyrabbit. You can always create a pull request by forking this repository and adding any enhancement in your branch.

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.