GOMS. 2026 · Term 1

Mini 2: Micro-Redis

In Mini 1, you used Redis. Now you'll build one. Your task is to design and build a Redis-compatible service in Rust, on top of tokio. You only need to support a small subset of Redis commands. For pedagogical reasons, a few of the core requirements below differ from how the real Redis server behaves, sometimes quite a lot. Where our spec and real Redis disagree, follow ours.

Core Design Requirements

Wire Protocol. To be Redis-compatible, the service must speak the Redis wire protocol. We'll use protocol version 2 (RESP2).

Port. It should be possible to specify the port the service listens on, for example with a command-line flag. Default to 6379, as real Redis does.

API Specifications

Use the official Redis command reference for each command's behavior and performance guarantees, and handle errors sensibly. We only support the following commands:

As you develop, write extensive programmatic tests to convince yourself (and us) that the service meets these requirements. Automatic linearizability checking is optional; see the extra challenge below.

Exclusionary

You do not need to support pipelining, where a client sends several commands at once and command B is queued while command A is still running. In our setting, each client sends one command and waits for its response before sending the next. (The extra credit below may change that.) You also don't need persistence: everything can live in memory, and it's fine to lose it all when the service stops.

How to hand in

Getting Started & Hand-in Instructions

This mini is individual. You'll work in your own GitHub repository.

Demo day. You'll demo your service live, with several clients talking to it at once. Find another person to help you on the day. Once you've demoed, make the repository public so we can grade it.

Tips and Pointers:

Extra Credit (Optional)

Support enough Redis commands, properly, to run your Mini 1 crawler on top of your own Redis instead of the real one. Which commands you'll need depends on how you built your crawler. Implement them as in the real spec, keep them linearizable like the rest, and list them in your README. (If crawl status -f uses pub/sub, you'll either need that too or switch to polling.) Show it off on demo day.

Two things to watch out for:

Extra Challenge (for No Real Credit)

This one is just cool. If you're up for it, write a linearizability checker and test your service with it. According to the Internet, Stateright is a good starting point.