Chapter 7. Implementing web Things

 

This chapter covers

  • Exploring the three possible patterns to implement web Things
  • Giving access to sensors and actuators via web protocols
  • Building REST and WebSockets APIs on your Pi with Node.js and Express
  • Building CoAP devices and connecting them to the web
  • Using MQTT on your Pi to connect to the EVRYTHNG API

In the previous chapter, we focused on how to design a clean web API for physical Things. This chapter builds on the principles you learned and describes how to actually implement those APIs for real Things.

The next sections detail the three different ways to implement a web Thing API so it deals with the implementation strategy. Here, we focus on the integration patterns of Things to the web, answering the question, “Where do we actually implement the API of the Thing to integrate it to the web?” This question is important because not all Things are equal! As you saw in chapter 5, some Things can have internet access and implement web protocols natively. But for other Things that are more computationally or power-constrained, web protocols might be challenging.

7.1. Connecting devices to the web

 
 

7.2. Direct integration pattern—REST on devices

 
 
 

7.3. Gateway integration pattern—CoAP example

 
 
 
 

7.4. Cloud integration pattern—MQTT over EVRYTHNG

 
 

7.5. Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest