DEV Community

Tingwei
Tingwei

Posted on

yeeKV: A Lightweight Redis-like Key-Value Store in Go

yeeKV_logoCheck it out on GitHub

yeeKV is a lightweight Redis-inspired key-value store, perfect for learning and experimentation. It supports core Redis features like strings, lists, and streams, and ensures thread-safe operations, so multiple clients can safely interact with the store concurrently. While it already works well, there’s still plenty of room for more features.

Features

  • RESP Protocol: Works with Redis clients
  • Multiple Data Structures: Strings, Lists, Streams
  • Key Expiration: Millisecond precision (PX)
  • Thread-Safe: Concurrent access is safe

Quick Start

Start the server:

go build -o yeekv main.go ./yeekv 
Enter fullscreen mode Exit fullscreen mode

Use the built-in CLI:

go build -o yeekv-cli cli.go ./yeekv-cli 
Enter fullscreen mode Exit fullscreen mode

Example session:

yeeKV> SET foo bar OK yeeKV> GET foo bar yeeKV> exit bye~ 
Enter fullscreen mode Exit fullscreen mode

Roadmap

  • More Redis commands (DEL, EXPIRE, INCR…)
  • Optimized storage & memory management
  • Persistence (RDB / AOF)
  • Cluster mode & Pub/Sub support

Top comments (0)