Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Portfolio Projects · Build It Yourself · with code: Go · about 14 min to read

Play it as a journeyTutor comes with a plan

S5 · Build a Message Log (Kafka-style)

S1 - Build Your Own Database
S1 - Build Your Own Database · Open board

S1’s file that only ever grows, with records added at the end and never edited. This project keeps that file and changes who reads it: many readers, each remembering how far down the file it has got.

Before you start. You’ve built S1, so an append-only log, a length in front of each record, and replay on startup are already yours. This project points that same log at a different job: carrying messages from the programs that write them to any number of programs that read them. The slow build of the same thing, one lesson per wall, is the From Scratch Kafka series starting at Build Your Own Kafka, From Scratch. This page turns it into one repo and does not repeat its detail. Enough Go is an optional first read.

Lesson 5 of 19 in Portfolio Projects

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 12 June 2011, Athens: a broker that doesn’t know who read what
  • The job: carrying messages between programs
  • The trick: keep everything, and let readers keep their place
  • Three more walls, the same as any system that grows
  • Why build it, and what to call it
  • Get the code
  • The seven stages, each a commit
  • The code, stage by stage
  • The numbers for your README: the bytes on disk
  • Put it on GitHub

Terms it explains: message, producers, consumers, broker, offset, segments, partitions, consumer group, compaction, log-structured, WAL.

Review Portfolio Projects