About “Rocks For Every one”

Learning the RocksDB internals in “right amount of” depth.

Kai Liu
RocksDB for everyone
2 min readFeb 17, 2014

--

Why do I write for “RocksDB for everyone”?

Prior joining Facebook, I read the source code of LevelDB, which was nicely written and very delightful to read. At that time, I managed to read through all the code and understood its high level design ideas — of course, there were still numerous nuances that I failed to pay attention to.

Luckily, at Facebook I got the opportunity to contribute to RocksDB, which was inherited from LevelDB and was improved for production workload. After looking into RocksDB closely and witnessing its evolution, a lot of puzzles about LevelDB/RocksDB were answered one by one.

After we open-sourced it, RocksDB is gaining increasing attention, from both industry and academia. A lot of people, with or without experience in database internals, are interested to learn more about this new power engine.

For me, I joined RocksDB team without much low level knowledge in database itself. However, as a light weight and relative simple database that absorbs wisdom from a variety of areas, I believe any one who have moderate background in system programming can learn a lot from RocksDB without struggling much.

That’s why I would like to share my thoughts in RocksDB with “everyone” who are interested.

What is this collection about?

The goals of this collection is to:

  1. Give you a high-level view of RocksDB internals, which will be helpful when you are about to navigate in RocksDB’s codebase.
  2. Highlight the good (and probably nuanced) design in RocksDB. I assume most of readers are not database experts (of course, I’m not expert, either). Thus, for many of you, who may already equipped yourself with some system programming knowledge, it could be very hard to understand some of the design and/or implementation details. I’d try my best to pick out these nuances and illustrate why they’re designed so.
  3. Share the lesson I learned from developing RocksDB.

Also, here are the non-goals:

  1. Not a code-level introduction. This collection only serves as an assistant during users’ RocksDB adventure.
  2. Not a complete guide. I only pick the most interesting aspects about RocksDB in this collection.
  3. Not an official documentation. For authoritative and update-to-date references of RocksDB, please check out RocksDB’s wiki page. I use this collection as a means for personal experience sharing.

So that’s the story behind this collection. Hope you enjoy RocksDB as much as I did.

--

--

Kai Liu
RocksDB for everyone

RocksDB developer; Big fan of #Linux/#Unix, #Python; Love and hate #C++; School hater -- yet spent over 8 years in 3 universities