Challenge 3a: Single-Node Broadcast

desccode

Challenge 3: Build a broadcast system! Starting with single node - just need to receive "broadcast" messages and respond with "broadcast_ok", plus handle "read" requests that return all messages seen so far.

What it Does

The Approach

Pretty straightforward for single node:

  1. Keep a slice of all received messages

  2. On broadcast: add to slice, reply with broadcast_ok

  3. On read: return the current slice

No coordination needed since it's just one node. This is the foundation we'll build on for multi-node scenarios.

Key Learnings

Simple start, but the complexity ramps up quickly in the next challenges when we add multiple nodes!

Links

← PrevSeriesNext →