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

Understanding the Observe pattern

For sensors reporting data regularly and securely, the greatest optimization is the use of the Observe (or Event Subscription) pattern. Using this pattern, the requestor, or subscriber, is only required to send one request, called the subscription. Just as with a normal request, the device returns a response containing the data it wants to return. The difference lies in when the resource changes. When that happens, the device automatically sends a new response to the subscriber, without having to wait for a corresponding request.

Resources that support the Observe pattern are called observable resources. Observing resources is defined in RFC 7641: https://tools.ietf.org/html/rfc7641

In a normal case, this ...

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