Exercise 3: State Sync Race Condition
Exercise 3: State Sync Race Condition
animation
ux
interaction-patterns
NoteTry It Yourself
Hands-on exercises to reinforce interaction pattern concepts:
Exercise 3: State Sync Race Condition
Create a multi-client simulation:
- Open the Wokwi ESP32 MQTT simulator in two browser tabs
- Both tabs subscribe to
home/thermostat/temperaturetopic - Both tabs publish temperature changes simultaneously
- Observe last-write-wins behavior
What to observe: Which client’s change “wins”? Notice how timestamp resolution affects conflict detection. See what happens if clocks are skewed between clients.