Volume I — A Manual for Thought

Notes that think
back at you.

A quiet writing room for the long-form thinker — a second brain bound in restraint. Programming, distributed systems, and things that interest me.

缺失的边:从 Lamport Happens-Before 到结构化并发

happens-before:一个跨越分布式系统与并发编程的核心概念

并发编程的复杂性往往源于对执行顺序的误解。本文通过事件图(Event Graph)视角,重新审视 Lamport 提出的 Happens-Before 原则,并探讨其在现代语言内存模型与结构化并发中的演进。

Singleton

一些关于单例的点

Some notes about Singleton pattern in C++.

LevelDB Table format

The Design of LevelDB's Table Format

Overview of WriteBatch layout and record encoding for LevelDB table operations.

LevelDB Logformat

The Design of LevelDB's Log Format

Structure of LevelDB's write-ahead log blocks and record fragmentation.

LevelDB DBformat

The Design of LevelDB's Database Format

InternalKey and LookupKey formats, value types, sequence numbers, and comparator rules in LevelDB.

LevelDB SSTable

Detailed Design and Implementation of SSTable Format in Prism

SSTable file layout, block structure, and encoding details used by LevelDB.

LevelDB Memformat

The Design of LevelDB's Memtable Format

MemTable design: SkipList-based in-memory buffer, arena allocation, and encoded entry layout.