Just an example

This chapter looks at an example application that uses several services including some services with custom code such as an Azure Function and a Node.js service called the realtime service. The realtime service uses socket.io to provide real-time data to clients over WebSockets or similar protocols. The service obtains its data from a Redis server in Azure as depicted in the diagram below.

This example application will cover quite some ground. It is kept deliberately simple so that it is easy to understand how all the components work together. We will do the following:

  • Configure a Particle Photon to send one data point to the Particle Cloud that forwards the data to Azure IoT Hub; the Photon will publish a value every 10 seconds

  • Write an Azure Function that use the Event Hub endpoint of IoT Hub as input that publishes the value to a Redis channel

  • Write a realtime service in Node.js that subscribes to the Redis channels and provides the data to remote clients using WebSockets or similar protocols; socket.io is used to make that very easy although one can debate if using socket.io is easier than just plain WebSockets

  • The application will be packaged in a Docker container manually; we will then upload the container image to a registry and deploy the container in the cloud using Azure App Service (for Linux)

results matching ""

    No results matching ""