Skip to content

SAKURA-CAT/my-redis

Repository files navigation

progress-banner

my-redis is a simple implementation of a Redis server, with a subset of the commands supported by Redis. It is an incomplete, idiomatic implementation of a Redis server built with Tokio.

This is a starting point for Rust solutions to the "Build Your Own Redis" Challenge. Just for fun, and to learn Rust.

While I'm working on this, I also drew inspiration from the mini-redis.

TODO List

  • Basic server structure
  • Parse RESP protocol
  • Support the basic command parsing, like SET, GET, PING
  • Support expiration
  • Background tasks
  • OpenTelemetry
  • RDB Persistence
  • Replication
  • Pub/Sub
  • Docker image support

Running

The repository provides a RESP-compatible server, which can use redis-cli to interact with it.

Start the server:

cargo run --bin redis-server

You can use redis-cli to interact with the server like this:

redis-cli set foo bar ex 10
redis-cli get foo  # 'bar' in 10 seconds

About

Build my own Redis with Rust!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published