[Notes]: Skip Lists

Prelude

These are just some of my notes and references from implementing a skip list in Rust. Creating a skip list implementation that has concurrency features is my personal intro project to Rust so there will also be some notes on lock-free and wait-free techniques. The overarching goal is to utilize this skip list as the in-memory component of an LSM-tree based storage engine, that I will maybe, hopefully, aspirationally, try to make. LevelDB in Rust if you will.

Notes

  • Used as the in-memory component of LevelDB’s log structured merge tree (LSM tree) implementation

  • Skip list vs self-balancing search trees (e.g. Red-black trees)

    • A skip list is more amenable to concurrency because less nodes are required to be updated during an insert

    • On update, a self-balancing tree may require multiple ancestors to be changed when the balancing operations (e.g. rotations in a Red-black tree)

  • LevelDB is doesn’t have concurrent writes? Source appears to require an external lock mechanism for writes.

  • When used as the in-memory component of an LSM tree, the skip list should support sorting by reverse chronological order. This can be done by having a synthetic key with a timestamp/revision number or via reverse iteration by back pointers. This is because the LSM tree is an append only structure.

Some concurrency stuff

Useful references

New Site

Finally upgraded the blog! It will be located at https://www.nerdondon.com now. Gonna keep thisaround cuz I'm sentimental like that.… Continue reading

[Notes]: Bloom Filters

Published on September 11, 2021

[Notes]: LSM Trees and Storage Engines

Published on August 13, 2021