O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recovering from stale states

The final thing we need to do before our controller is ready, is to add a mechanism to recover from stale states. There are many reasons why a controller might end up in a stale state. A stale state is defined as a state that does not correspond to reality. There might be network problems for the controller, or any of the devices it depends on. The devices might be broken, replaced, or simply restarted. To build in some form of resilience into our controller, we need to monitor that we get sensor data in a timely fashion and that we can perform control actions properly.

There are basically three things we need to monitor:

  • That we receive subscription events properly
  • That the device connections are still valid ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required