← LessonsCREATOR PATH · 10–12🏥

Clinic Vector Clocks

LESSON 125
🎯 Today's missions
🏥⏱️♥
HOSPITAL TECH

Clinic Vector Clocks

The ER and Ward can update a chart while the network is slow. Give each event a two-part memory so the clinic can tell what happened before—and what happened independently.

🧠 Before we start

In the Firefly Hash Ring, stable labels kept routes predictable. Today, a vector clock gives every update a causality label. Each station counts its own events, shares its knowledge, and keeps the largest count from every station.

🩺 Local event→➕ Own count→📨 Share→⬆ Keep each maximum
Challenge 1 of 4Count local events
1

Timestamp two independent updates

Tap one event at each station. A local event increases only that station's own part of the clock.

TWO STATIONS · TWO COUNTERS · NO SHARED NEWS YET

🚑 ER Station

ER0Ward0

ER knows its own updates and any Ward news received.

🛏️ Ward Station

ER0Ward0

Ward keeps the same two labels in the same order.

🌟 What you learned

Come back tomorrow! Another advanced visual coding adventure is waiting. ✨