Skip to content

siddarthpai/wardrobe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wardrobe

(I named it wardrobe because it's an in-house Redis replica I built. What better name for in-house storage than wardrobe )

wardrobe is a fast, minimalist in-memory key-value store written in Go, inspired by Redis. Built from scratch, it supports core Redis functionalities like persistence, replication, transactions, streams, and TTL — all accessible via redis-cli.


features

  • In-Memory Storage – blazing fast access
  • RDB Persistence – saves data to dump.rdb
  • Master-Slave Replication – supports replication config
  • TTL Support – with EXPIRE and time-based key eviction
  • Transactions – with MULTI and EXEC
  • Streams – with XADD
  • Fully redis-cli compatible

how do you run this ?

1. clone and build

git clone https://github.com/siddarthpai/wardrobe.git
cd wardrobe
go build -o wardrobe

2. run the server

./wardrobe --port 8000

using redis-cli to test

redis-cli -p 8000

Example commands: checking if it works :

pingpong working with strings : Strings

working with lists : Lists

working with sets : Sets

using transactions : transactions

using expiration on values : ttl


commands it supports

Command Description
SET key value Set a key to a value
GET key Get the value of a key
DEL key Delete a key
PX key seconds Set TTL for a key
INCR key Increment a key’s integer value
MULTI / EXEC Start and execute a transaction
PING Ping the server

testing out replication

starting the master instance : creating the replica instance :


testing out persistence

  • dump.rdb is auto-loaded on startup if available.

future enhancements

  • supporting more data types, rn supports strings, lists and sets.
  • snapshotting of rdb and AOF.
  • look into making it more of a valkey replica with multithreading.

contributing

PRs, issues, and feature requests welcome!


references

GitHub → siddarthpai/wardrobe

Redis Documentation


About

in-house redis built from scratch using go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages