Rust Projects - Write a Redis Clone

A hands-on guide to building your own Redis in Rust.

Version 2.0.0

This book is a hands-on guide for building a Redis-like database while mastering Rust. The book follows the CodeCrafters challenge of the same name. Readers will start by learning concepts like binding to TCP ports and setting up a server, progressively covering more complex tasks, such as handling multiple client connections and implementing key Redis commands.

The book currently covers the base challenge and the two extensions "Replication" and "Transactions".

This work is also available in PDF format on LeanPub in a pay-what-you-want scheme.

Chapters

Introduction

Chapter 1

Initial Steps

Chapter 2

The RESP Protocol

Chapter 3

GET and SET

Chapter 4

Key Expiry

Chapter 5

Concurrency with actors

Chapter 6

Refactoring commands

Chapter 7

Replication - Part 1

Chapter 8

Replication - Part 2

Chapter 9

Transactions

Changelog

Final words