More Projects
Patterns from databases, JVM ecosystem, browsers, and other notable open-source projects.
Databases & Storage
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| MVCC | PostgreSQL | heapam_visibility.c | HeapTupleSatisfiesMVCC — snapshot isolation visibility check |
| Write-Ahead Log | PostgreSQL | xlog.c | Transaction WAL for crash recovery, replication, PITR |
| MVCC | etcd | kvstore.go | Multi-version KV store powering Kubernetes config |
| Write-Ahead Log | etcd | wal.go | Raft consensus WAL for distributed state |
| LRU Cache | Redis | evict.c | Approximated LRU with sampling-based eviction pool |
| Trie | Redis | rax.c / rax.h | RAX radix tree for Streams and sorted key ranges |
| Skip List | Redis | t_zset.c | Sorted set implementation with probabilistic balancing |
| Bloom Filter | LevelDB | bloom.cc | Block-level bloom filter to skip unnecessary disk reads |
| Skip List | LevelDB | skiplist.h | Lock-free memtable with atomic next pointers |
| Arena Allocator | LevelDB | arena.cc | Block-based arena for memtable allocations |
| Merge Iterator | LevelDB | merger.cc | MergingIterator merges sorted iterators (memtable + SSTable levels) into single sorted view |
| LSM Tree | LevelDB | db_impl.cc | DBImpl::Write — batch writes to WAL, insert into memtable, flush to SST on threshold |
| Merge Iterator | RocksDB | merge_helper.cc | TimedFullMerge combines multiple versions of the same key during compaction |
| LSM Tree | RocksDB | memtable.cc | MemTable::Add — skip-list backed memtable, flush to L0 SST when full |
| B+ Tree | PostgreSQL | nbtinsert.c | B-link tree (Lehman-Yao variant) — all tables and indexes backed by B+ trees on disk pages |
| B+ Tree | SQLite | btreeInt.h | Interior cells hold child page pointers + keys; leaf cells hold payloads. Page splitting via balance_nonroot() |
| Merkle Tree | ZFS (OpenZFS) | blkptr.c | Block pointer checksums form a Merkle tree from data blocks to uberblock for silent corruption detection |
| Checkpointing | PostgreSQL | checkpointer.c | CheckpointerMain — flush dirty buffers, write checkpoint WAL record, update pg_control |
| Checkpointing | Redis | rdb.c | rdbSaveRio — fork child process to write point-in-time RDB snapshot without blocking main thread |
JVM Ecosystem
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| Actor Model | Akka | Actor.scala | trait Actor — message-driven concurrency for JVM |
| Circuit Breaker | Netflix Hystrix | HystrixCircuitBreaker.java | Three-state circuit breaker for microservice resilience |
| Batch Processing | Apache Kafka | RecordAccumulator.java | Accumulate records into batches per partition |
| Work Stealing | OpenJDK | ForkJoinPool.java | scan method with randomized work stealing |
| LRU Cache | Guava | CacheBuilder | maximumSize() with LRU eviction |
| Rate Limiter | Guava | RateLimiter | Smooth bursty / warm-up token bucket |
| Consistent Hashing | groupcache | consistenthash.go | Hash ring with virtual replicas (by Brad Fitzpatrick) |
Erlang / BEAM VM
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| Actor Model | Erlang/OTP | erl_process.h | BEAM VM process struct — lightweight actor with mailbox |
| Cooperative Scheduling | Erlang/OTP | BEAM scheduler | Reduction-based preemption for millions of processes |
| Semaphore | Erlang/OTP | erl_process_lock.c | Process locks for safe concurrent access |
Browsers & Web
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| Bloom Filter | Chromium | selector_filter.h | CSS selector bloom filter — skip 60-70% of rules |
| Bitmask | React | ReactFiberFlags.js | Fiber effect flags — Placement, Update, Deletion |
| Double Buffering | React | Fiber architecture | Current tree vs work-in-progress tree swap on commit |
| Diff / Patch | React | ReactChildFiber.js | List reconciliation with key-based matching |
Infrastructure & Cloud
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| Retry Backoff | Kubernetes | backoff.go | Pod restart backoff, API server retries |
| Retry Backoff | gRPC-Go | internal/backoff/backoff.go | Exponential connection backoff with jitter |
| Dependency Graph | Terraform | Resource graph | Parallel resource apply with DAG ordering |
| Dependency Graph | Bazel | Action graph | Topological execution of build targets |
| Registry | gRPC-Go | server.go | RegisterService adds service descriptions to the server's service map for RPC method dispatch |
| Registry | TensorFlow | op.h | REGISTER_OP macro registers operations into the global OpRegistry for computation graph building |
| Consistent Hashing | Nginx | ngx_http_upstream_hash | Upstream load balancing with ketama hashing |
Compilers & Language Runtimes
| Pattern | Project | Where | What It Does |
|---|---|---|---|
| Visitor | LLVM | InstVisitor.h | CRTP visitor dispatches on IR instruction opcode for optimization passes |
| Visitor | Vue.js | transforms/vIf.ts | transformIf is a NodeTransform visitor that walks the template AST |
| Vtable | CPython | object.h | PyTypeObject vtable — tp_repr, tp_hash, tp_call, protocol suites |
| Interning | CPython | unicodeobject.c | PyUnicode_InternInPlace — intern identifier strings for O(1) dict lookups |
| Interning | Rust (rustc) | symbol.rs | Symbol is a u32 index into global interner — all identifiers interned |
| Tagged Union | Godot Engine | variant.h | Variant::Type enum + union — every GDScript value is a Variant |
| Tagged Union | PyTorch | ivalue.h | IValue holds a Tag enum + Payload union for TorchScript interpreter |