# When the Other System Is Down

The weather service will be down someday, and so will a device. The hub should keep working.

Updated: November 17, 2026

## [A Safe Stand-In for Nothing](https://www.ask-codey.com/courses/design-patterns/topics/dp-a-safe-stand-in-for-nothing)

1. [Null Object: A Safe Stand-In for Nothing](https://www.ask-codey.com/lessons/dp-null-object) (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](https://www.ask-codey.com/courses/design-patterns/topics/dp-try-again-then-stop-trying)

1. [Retry: Try Again, a Little Later](https://www.ask-codey.com/lessons/dp-retry) (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.
2. [Circuit Breaker: Stop Calling a Broken Service](https://www.ask-codey.com/lessons/dp-circuit-breaker) (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](https://www.ask-codey.com/courses/design-patterns/topics/exercise-dp-weather-outage)

1. [Exercise: When the Weather Service Is Down](https://www.ask-codey.com/lessons/exercise-dp-weather-outage) (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.

Source: https://www.ask-codey.com/courses/design-patterns/chapters/dp-when-its-down
