Link to the newsletter post: https://jyotinder.substack.com/p/unde...
Link to the complete code: https://github.com/JyotinderSingh/go-wal
Subscribe to my substack: https://jyotinder.substack.com
In this video we take a deep dive into understanding how Write Ahead Logs ensure durability in distributed systems, databases, and many such applications. We also take a deep dive into how WALs support high write throughput, data integrity, data recovery, and segmentation.
GitHub: https://github.com/JyotinderSingh
Website: https://jyotindersingh.com/
Timestamps:
00:00 - Introduction to Write Ahead Logs
0051 - How databases use WALs
01:10 - Structure of a WAL
02:09 - How WALs achieve high write throughput
03:15 - Segmented Logs
04:14 - WAL Repairs
05:16 - Implementation in Go
06:56 - Initializing a WAL instance
09:37 - Writing entries to the WAL
12:48 - Reading all entries
14:35 - Reading entries from offset
15:15 - Repairing corrupted segments
17:52 - Testing the implementation