October 21st, 2024

My free book "Rust Projects – Write a Redis Clone" is out

The book by Leonardo Giordani teaches building a Redis-like database using Rust and Tokio, covering essential programming concepts and advanced features, with a 60-day money-back guarantee for purchases.

Read original articleLink Icon
My free book "Rust Projects – Write a Redis Clone" is out

"Rust Projects: Write a Redis Clone" by Leonardo Giordani is a practical guide aimed at teaching readers how to build a Redis-like database using Rust and the Tokio framework. The book is currently 40% complete and focuses on asynchronous programming and the actor model. It introduces essential programming concepts such as TCP connections, the RESP protocol, and concurrency, making complex topics more accessible. The project follows the CodeCrafters challenge, allowing readers to progressively learn by implementing key Redis commands like GET and SET, as well as managing client connections and key expiry mechanisms. The book also plans to cover advanced features like replication and transactions, making it a valuable resource for both beginners and those looking to deepen their Rust knowledge. Additionally, it offers a 40% discount code for CodeCrafters.io and includes a 60-day money-back guarantee for purchases. The author, Leonardo Giordani, has a background in various programming languages and has previously published works on technical subjects.

- The book teaches building a Redis-like database using Rust and Tokio.

- It covers essential concepts like TCP connections, RESP protocol, and concurrency.

- The project follows the CodeCrafters challenge for hands-on learning.

- Advanced features like replication and transactions are planned for future updates.

- A 60-day money-back guarantee is offered for purchases.

Link Icon 8 comments
By @rollschild - 6 months
This reminds me of Tim McNamara's course Implement RougeDB, a Redis clone from outer space (https://learning.accelerant.dev/view/courses/implement-rouge...). I paid somewhere around $100 for this course (through some coupon code, I remember the original prices was $200-ish). It was supposed to be completed by Aug 2023, yet almost one year and a half later, it's still incomplete. I almost gave up at this point.
By @tracker1 - 6 months
Haven't read the book. I feel like this is effectively "Rust: The Hard Parts" as a topic. Mostly in that from my admittedly limited understanding of rust, lifetimes and shared memory, Redis in rust semantics is almost an anti pattern.

I intend to look into this book as I find the topic interesting. But do feel that it's tackling some of the more cumbersome areas of rust. I'm also curious if there will be an effort to be binary file compatible.

With the Redis licensing kerfuffle and since fork of valkey I wonder about some of the other redis alike databases there are and will be. I think that rust is just a hard fit for this use case. But who knows.

By @stefanos82 - 6 months
> This book is 40% complete

Shall we wait until it reaches 100% first and then people buy it?

By @andy_ppp - 6 months
So, just out of interest how close does this get to the performance of redis? It’s interesting to see a highly optimised production product compared to a presumably more trivial implementation I can read in a book. Still this might be a great way to learn rust!
By @ubisol - 6 months
Anybody knows if there is a golang version of a write a redis clone ?
By @melon_taeppe - 6 months
I was doing the codecrafter course then went off-script when creating the parser, this is good to have all the steps in one place so I dont need to jump through the hoops on the website
By @jgarzik - 6 months
By amusing coincidence, I wrote a Redis clone in Rust: https://github.com/bloq/memds