Skip to content

nadashaban11/RediGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RediGo

RediGo is a high-performance, concurrent, in-memory key-value store written from scratch in Go. It implements the Redis Serialization Protocol (RESP) and mimics the internal architecture of Redis.

Note: This project is currently a Work In Progress . I am actively building it to deepen my understanding of network programming, concurrency, and database internals.

Features Implemented

  • TCP Server: Handles multiple concurrent clients efficiently.
  • Architecture: Implements the Command Dispatcher Pattern for clean, modular, and scalable command routing.
  • Concurrency Control: Thread-safe data access using Mutex locks (sync.RWMutex).
  • RESP Parser: Efficient encoding/decoding of Redis commands.
  • Key-Value Store: Supports basic string operations with Expiry (TTL) logic (SET EX/PX, GET, INCR).
  • Lists: Complete support for list operations including blocking pop with timeouts (LPUSH, RPUSH, LRANGE, LPOP, BLPOP).
  • Streams (Message Queue): Implementation of Redis Streams including auto-generated IDs, range queries, and blocking reads with polling (XADD, XRANGE, XREAD, XREAD BLOCK).

Tech Stack

  • Language: Go
  • Concepts: Network/TCP Programming, Concurrency, Mutexes, Polling, Custom Parsers.

How to Run

  1. Clone the repository:
git clone https://github.com/nadashaban11/RediGo.git
  1. Run the server:
go run main.go
  1. Connect using redis-cli
redis-cli -p 6379
127.0.0.1:6379> PING
PONG

About

A concurrent, Redis-compatible in-memory key-value store built from scratch in Go using the RESP protocol.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages