When the Other System Is Down
The weather service will be down someday, and so will a device. The hub should keep working.
Updated
A Safe Stand-In for Nothing
- Null Object: A Safe Stand-In for Nothing (Journeyman): When a room has no speaker, every routine that plays something has to check for null first, and the one that forgets crashes the morning; a Null Object gives the room a speaker that safely does nothing, so the routines need no checks at all.
Try Again, Then Stop Trying
- Retry: Try Again, a Little Later (Journeyman): When a far-away weather service misses one call in a hundred, showing "unavailable" for a hiccup that a second try would fix lets the user down; Retry tries again a few times, waiting longer each time with a little randomness, and only for calls that are safe to repeat.
- Circuit Breaker: Stop Calling a Broken Service (Freelancer): When a weather service is down for an hour, every screen that asks it waits for its timeout, again and again, and retries only make the wait longer; a circuit breaker remembers the failures, stops calling for a while, and lets one trial call through to see whether the service is back.
Exercise: When the Weather Service Is Down
- Exercise: When the Weather Service Is Down (Freelancer): Take Maya's ticket after a bad morning: the hub's briefing gives up on one missed call, keeps knocking on a weather service that's down for an hour, and crashes on a bedroom with no speaker. Make it try again politely, leave the service alone while it's down, and cope with the missing speaker, with the tests green throughout and a fake clock so no test ever waits.