← Course home

Python reference · Reference

Storage and locality

Connect in-memory trees, write-ahead logs, sorted runs, and locality to storage-engine behavior.

ReferenceAbout 2 min

This page lists the library modules for Storage and locality. The lesson is Storage engines and locality.

This page is the module index for storage and locality.

  • storage/engines.py — in-memory B-tree, write-ahead log, toy LSM with Bloom-filtered runs, scan benchmark, brute-force nearest neighbor.

Focused lesson

Industry

A working engineer stores ordered keys in a B-tree, or buffers writes and flushes sorted runs. PostgreSQL's documentation makes the B-tree the default CREATE INDEX for equality and range queries. RocksDB's overview describes the write path this module models: new writes go into a memtable and optionally a write-ahead log, a full memtable is flushed to a sorted sst file, and compaction merges files into sorted runs.

Implementation and tests Optional reference

Library code 1

  • bitsandbytes.storage.engines

Use these references to compare the explanation with repository code and tests. A test link means it imports a lesson symbol; it does not by itself claim complete behavior coverage.