Git Product home page Git Product logo

exploring-redis's Introduction

Exploring Redis

exploring-redis

Redis is an in-memory datastore which is an acronym for Remote Dictionary Server. It is used as a database, cache, streaming engine, and message broker.

Official docs - https://redis.io/

Features

Explore different branches to track the code's evolution, with the main branch containing the final code. Key implemented features include:

  • Custom Protocol (TLV - Type-Length-Value)
  • Event Loop and Non-Blocking IO - using poll()
  • Efficient Hashtables with Chaining and Progressive Resizing
  • Data Serialization
  • AVL Trees - implement zset
  • Timers for poll() using a doubly-linked list
  • Min-Heap for Time-To-Live (TTL) tracking
  • Multi-threading for handling resource-intensive operations like zset deletions

Commands

General Key-Value Commands

  • keys - Lists all keys along with their corresponding values.
  • get - Retrieves the value associated with a given key.
  • set - Sets a key to hold a specified string value.
  • del - Deletes a specified key and its associated value.
  • pexpire - Sets a time-to-live (TTL) for a key in milliseconds.
  • pttl - Returns the remaining time to live of a key with a TTL, in milliseconds.

ZSet (Sorted Set) Commands

For more info, check server/zset/README.md

  • zadd - Adds one or more members to a sorted set with associated scores.
  • zrem - Removes one or more members from a sorted set.
  • zscore - Returns the score of a member in a sorted set.
  • zquery - Performs queries and operations on sorted sets.

Running Locally

Prerequisites

Before running the project, ensure you have the following tools installed:

sudo apt install make g++

Compilation

cd server
make
# new terminal
cd client
make

After the compilation step, you can run the server and client as needed.

To remove the executables, type make clean

References

build-your-own.org/redis

exploring-redis's People

Contributors

nkilm avatar

Stargazers

 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.