Skip to main content
avatarJay Patel

DDIA Notes — Chapter 7: Transactions

19 min readBackend, Distributed Systems

A thorough walk through Chapter 7 of Designing Data-Intensive Applications: what a transaction really is, ACID demystified, every weak isolation level (read committed, snapshot isolation) and the race conditions they do and don't prevent (dirty reads/writes, read skew, lost updates, write skew, phantoms), and the three ways to achieve full serializability — serial execution, two-phase locking, and serializable snapshot isolation.

#ddia#transactions#acid#isolation-levels#serializability#concurrency#mvcc#two-phase-locking

DDIA Notes — Chapter 5: Replication

14 min readBackend, Distributed Systems

Working through Chapter 5 of Designing Data-Intensive Applications: why we replicate data, the three replication architectures (single-leader, multi-leader, leaderless), synchronous vs asynchronous tradeoffs, what goes wrong with replication lag, and how systems detect and resolve write conflicts.

#ddia#replication#distributed-systems#consistency#quorum#multi-leader#leaderless

DDIA Notes — Chapter 4: Encoding and Evolution

11 min readBackend, Distributed Systems

Working through Chapter 4 of Designing Data-Intensive Applications: why we need encoding formats at all, how JSON/Protobuf/Avro/Thrift differ, what backward and forward compatibility actually mean, and how data flows between processes via databases, RPC, and message queues.

#ddia#encoding#serialization#protobuf#avro#thrift#schema-evolution#rpc

DDIA Notes — Chapter 3: How Databases Store and Find Your Data

10 min readBackend, Databases

Working through Chapter 3 of Designing Data-Intensive Applications: how indexes actually work, from a dumb append-only log to hash indexes, SSTables, LSM-trees, B-trees, and the secondary indexes built on top of them.

#ddia#databases#indexes#lsm-tree#b-tree#sstable#storage-internals

Postgres Concepts I Wish I'd Learned Earlier

13 min readBackend, Databases

Notes on the advanced Postgres jargon that keeps showing up in production discussions — MVCC, WAL, locks, vacuum, RLS, replication, and the connection pooling gotchas that flow from them.

#postgres#databases#mvcc#replication#backend

How Amazon S3 Works Under the Hood

10 min readBackend, Distributed Systems

A deep dive into how S3 actually stores 100 trillion objects — the metadata/data split, flat namespace, placement service, durability through erasure coding, versioning, multipart uploads, garbage collection, and consistency.

#s3#aws#object-storage#distributed-systems#storage-internals

Solving the Double-Booking Problem: Distributed Locking, Idempotency, and Redis

9 min readBackend, Distributed Systems

How I built a ticket booking system that handles concurrent seat reservations using Redis distributed locks, PostgreSQL pessimistic locking, idempotency keys, and compensating transactions.

#redis#distributed-locking#idempotency#concurrency#postgresql#nextjs#bullmq#typescript

Building an Agent-Driven UI with the A2UI Protocol

5 min readWeb Development, AI

How I implemented the A2UI (Agent-to-UI) protocol to let an AI agent dynamically generate interactive UIs using streaming messages, data binding, and declarative components.

#a2ui#nextjs#typescript#ai-agents#strands-sdk#react