Codementor Events

Rebuilding Redis in Ruby

Published Feb 24, 2021Last updated Mar 03, 2021

Rebuilding Redis in Ruby is an online book about Rebuilding Redis ... in Ruby!

The goal is purely educational, I want to teach people how a database like Redis actually works, and I think the best way to do that, to paraphrase Richard Feynman, is to build it from scratch.

The book is not done yet but all basic data types have been implemented, Strings, Lists, Hashes, Sets & Sorted Sets.

The goal is to not take any shortcuts, for instance, Ruby does provide a Hash class which could be used to implement the GET and SET commands (and many others) pretty succintly, but we purposefully do not use them, in order to understand how Hash Tables really works. To do so, we spend quite some time looking at the Redis source code, which happens to be very readable even for people not familiar with C.

Discover and read more posts from Pierre Jambet
get started
post commentsBe the first to share your opinion
Show more replies