Build Your Own Redis with C/C++ EBook·Paperback
⟵ prev Contents next ⟶

ℹ️ New Book: Build Your Own Database

A2: Further Reading

Congratulations on finishing this book!

What’s included in the book is pretty much the basics. Here is a list of things to read about that might further your understanding.

KV Stores

It’s a good idea to actually read the Redis source code. The Redis source is very straightforward, which is rare to see, unlike the spaghetti you deal with in your job. It is also considered “from scratch” work.

You might also be interested in persistent KV stores instead of the in-memory ones. There is a book on this in the “Build Your Own X” book series: “Build Your Own Database From Scratch”.

Sockets and System Programming

In addition to manpages and Beej’s guides, “The Linux Programming Interface” is also good.

Event Loops

There are generic event loop libraries that can be used for cross-platform applications. The libev library is a minimal yet complete event loop implementation. It supports standard event loop features such as timers, wake-up-by-threads, and signals.


Try to read the RFCs of popular protocols, and think about why they are designed that way. Some design flaws in older protocols are fixed in newer protocols, which you can learn from them.


The best way to learn the basics of multi-threading is probably via operating system textbooks. This is because some operation system concepts are prerequisites for understanding multi-threading. Without understanding these concepts, you might end up using sleep and atomics here and there, which is not multi-threading at all.

Build Your Own X

This book is part of the “Build Your Own X” book series. You can find more books on the official website, such as books about databases or compilers.

See also: offers “Build Your Own X” courses in many programming languages.
Including Redis, Git, SQLite, Docker, and more.
Check it out

⟵ prev Contents next ⟶