Projects

Blog Posts

Java Concurrency Series, Part 8: Virtual Threads & Project Loom

What changes when threads become cheap? Understand carrier threads, continuations, pinning, StructuredTaskScope, and how virtual threads flip the economics of I/O-bound Java services.

Java Concurrency Series, Part 7: Concurrent Collections

Why can't you just wrap a HashMap in synchronized? Explore ConcurrentHashMap's node-level locking, CopyOnWriteArrayList's snapshot semantics, BlockingQueue variants, and a contention benchmark.

MySQL Internals Series, Part 7: Connection Management & Thread Model

How MySQL handles concurrent connections — thread pool, connection limits, resource management, and why connection pooling is essential.

PostgreSQL Internals Series, Part 7: Connection Management & Process Model

PostgreSQL's forking process model, backend lifecycle, connection pooling with PgBouncer, background workers, and resource limits per connection.

Java Concurrency Series, Part 6: Thread Pools & Executors

Why does tuning your thread pool size matter? Understand ThreadPoolExecutor internals, queue types, rejection policies, ForkJoinPool work-stealing, and CompletableFuture async pipelines.

MySQL Internals Series, Part 6: Binary Logging & Replication

How MySQL survives crashes and enables replication — binary log format, GTID, crash recovery, and streaming replication.

Java Concurrency Series, Part 5: Atomic Operations & Lock-Free Programming

How can you update shared state without any lock? Understand the CAS CPU instruction, AtomicInteger, the ABA problem, LongAdder's striping trick, and VarHandle memory access modes.

MySQL Internals Series, Part 5: Buffer Pool & Memory Management

How InnoDB caches pages in memory — buffer pool, LRU eviction, dirty pages, checkpoints, and sizing.

PostgreSQL Internals Series, Part 5: Memory & BufferPool

How PostgreSQL manages memory — shared buffers, eviction policies, dirty pages, checkpoints, WAL buffers, and optimal sizing.

Java Concurrency Series, Part 4: java.util.concurrent Building Blocks

Why does ReentrantLock exist if synchronized works? Explore tryLock, StampedLock optimistic reads, Condition variables, and LockSupport — the primitives that underpin all of java.util.concurrent.

MySQL Internals Series, Part 4: Query Execution & Optimization

How MySQL optimizes queries — cost model, statistics, execution plans, and steering the optimizer with hints.

PostgreSQL Internals Series, Part 4: Query Planning & Optimization

How the planner estimates costs, uses statistics, chooses join strategies, and why it sometimes picks seq scans over indexes.

Java Concurrency Series, Part 3: synchronized & Intrinsic Locks

What does synchronized actually do at the JVM level? Explore object headers, lock state inflation from biased to fat locks, wait/notify semantics, and deadlock diagnosis with jstack.

MySQL Internals Series, Part 3: Indexes & B-Trees

How MySQL indexes work — B-tree structure, clustered vs secondary, covering indexes, adaptive hash indexes, and index fragmentation.

PostgreSQL Internals Series, Part 3: Indexes & B-Trees

How PostgreSQL indexes work — B-tree structure, scans, deduplication, index types, bloat detection, and when the planner uses them.

Java Concurrency Series, Part 2: The Java Memory Model & Visibility

Why can a thread see stale data written by another? Understand CPU caches, write buffers, instruction reordering, and the happens-before relation that makes volatile work.

MySQL Internals Series, Part 2: MVCC & Transactions

How MySQL isolates transactions — MVCC, undo logs, transaction IDs, isolation levels, and the purge thread.

PostgreSQL Internals Series, Part 2: Transaction Isolation & MVCC

How PostgreSQL handles concurrent transactions — xmin/xmax visibility rules, snapshots, isolation levels, and the vacuum process.

Java Concurrency Series, Part 1: Threads, the OS, and the JVM

What really happens when you call new Thread().start()? Trace the path from Java to the OS kernel, understand thread lifecycle states, and use jstack to observe live threads.

MySQL Internals Series, Part 1: Storage Engine & InnoDB Basics

How InnoDB stores data on disk — page structure, row format, clustered indexes, B-trees, and why the primary key matters.

PostgreSQL Internals Series, Part 1: Page Layout & Storage

How PostgreSQL stores data on disk — page structure, tuple anatomy, alignment, TOAST, and practical inspection with pageinspect.

Java Concurrency Series, Part 0: Overview

A roadmap through Java concurrency — from threads and the memory model to virtual threads. Why getting concurrency right is hard, and what you'll learn.

MySQL Internals Series, Part 0: Overview

A roadmap through MySQL 8.4 LTS internals — from storage engines to replication. Why understanding the engine matters and what you'll learn.

PostgreSQL Internals Series, Part 0: Overview

A roadmap through PostgreSQL 18 internals — from storage to replication. Why learning the engine matters and what you'll build.