Skip to content

AB7zz/redis-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyRedis

A simple Redis clone implemented in C.

How to run

make
make run-server
make run-client

How to use

SET mykey "Hello, World!"
GET mykey

Redis Clone Implementation Checklist

Data Types

  • In-memory Key-Value Store
    • Strings (SET/GET)
    • Lists (LPUSH/RPUSH/LPOP/RPOP)
    • Sets (SADD/SREM/SMEMBERS)
    • Sorted Sets (ZADD/ZREM/ZRANGE)
    • Hashes (HSET/HGET/HDEL)
    • Streams (XADD/XREAD)

Persistence

  • Snapshot Persistence (SAVE/BGSAVE)
  • Append-only File Persistence (AOF)

Features

  • TTL Support (EXPIRE/TTL)
  • Pub/Sub Messaging (PUBLISH/SUBSCRIBE)
  • Client/Server Architecture
    • TCP Socket Implementation
    • Command Processing
    • Response Formatting
  • Event Loop for I/O Multiplexing
  • Single-threaded Architecture
  • Atomic Operations
    • INCR
    • INCRBY
    • DECR
    • DECRBY

About

Redis written in C from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published