Design power grid device monitoring over an unreliable public internet
OpenAISoftware Engineer · OnsiteLast updated
Design a monitoring system for power grid field devices that report their status over an unreliable public internet. It tests store-and-forward reporting, idempotent ingestion of late and duplicate data, telling silent devices from failed ones, alerting, and security for critical infrastructure.
Design a system that monitors devices on a power grid. Devices in the field report their status to a central monitoring system over the public internet, and the public internet is unreliable: connections drop, messages are delayed or repeated, and a device can stay unreachable for long periods. Operators use the system to see the current state of the grid and to be alerted when something goes wrong.
Clarifying Questions
- How many devices are there, how often does each one report, and what does a status report contain?
- Is the system for monitoring only, or must it also send commands back to devices?
- How quickly must an operator learn that a device has failed or gone silent?
- How much storage and compute do the devices have for buffering?
- How long must status history be kept, and at what resolution?
Hints
Hint 1
Silence is ambiguous: When a device stops reporting, list everything that could explain it, and what the system would need to tell those cases apart.
Hint 2
Where data can be lost: Trace one status report from the device to the operator's screen, and mark every point where it can be dropped, duplicated or delayed.
Follow-up questions
- A regional internet outage takes many devices offline for an hour, and then they all reconnect at once. Walk through what your system does, step by step.
- If operators must also send commands to devices, what changes in the protocol, the architecture and the safety requirements?
- How would you detect a device that keeps reporting on schedule but whose readings are wrong?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.