Book Image

Learning AWS IoT

By : Agus Kurniawan
Book Image

Learning AWS IoT

By: Agus Kurniawan

Overview of this book

The Internet of Things market increased a lot in the past few years and IoT development and its adoption have showed an upward trend. Analysis and predictions say that Enterprise IoT platforms are the future of IoT. AWS IoT is currently leading the market with its wide range of device support SDKs and versatile management console. This book initially introduces you to the IoT platforms, and how it makes our IoT development easy. It then covers the complete AWS IoT Suite and how it can be used to develop secure communication between internet-connected things such as sensors, actuators, embedded devices, smart applications, and so on. The book also covers the various modules of AWS: AWS Greengrass, AWS device SDKs, AWS IoT Platform, AWS Button, AWS Management consoles, AWS-related CLI, and API references, all with practical use cases. Near the end, the book supplies security-related best practices to make bi-directional communication more secure. When you've finished this book, you'll be up-and-running with the AWS IoT Suite, and building IoT projects.
Table of Contents (14 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Consuming real-time sensor data in a web application


In this section, we will learn how to visualize sensor data in real time. The scenario is to perform sensing from an IoT device and then send sensor data to the client app. This concept is similar to the publisher/subscriber application. This scenario is depicted in the following figure:

To implement how to visualize sensor data in real time, we will develop a web application that utilizes HTML5 and JavaScript. Once the sensing process is done, the sensor data will be sent to the web client application. The data pushing engine can apply the Socket.IO library to address data transferring in real time.

Socket.IO provides a JavaScript/Node.js that implements WebSocket to push data from the backend to the frontend. This library can  serve request sensor data and push the data. You can get more information about Socket.IO at https://socket.io/.

In this section, we will develop a web application using Node.js and apply Express for the web framework...