Microsoft Azure Concepts – Internet of Things

iotAccording to the IDC, the Internet of Things market will grow to £1.3 Trillion in 2020 with over 25 Billion connected devices.  Gartner also share this belief and predict that we will have 21 Billion connected devices in 2020 with a market valued at £2.4 Trillion.

With the advent of smart homes and the requirement to provide remote monitoring and predictive maintenance to every day items, the question this raises in my mind are:

  • How do you provide reliable connectivity to these devices?
  • How do you provide updates to these devices?
  • How do you collect and analyse the information?
  • How do you monitor and alter on the data sets?
  • How do you scale or contract the solution?
  • How do you provide availability and DR for the solution?

To answer these questions and more Microsoft released Internet of Things in February 2016.

What Is Microsoft Azure Internet of Things?

Microsoft Azure Internet of Things (IoT) comes in two flavours which are a pre-packaged solution using the IoT Suite or the IoT Hub which provides the connectivity and monitoring from IoT clients.

IoT Suite

The overall aim of the IoT Suite is a starting point for proof of concepts or early customer initiatives.   The IoT Suite is offered as two pre-configured solutions which are:

  • Remote Monitoring
  • Predictive Maintenance

Each of these solutions pulls together different Azure services to create the overall suite.  These include:

  • Azure IoT Hub
  • Azure Stream Analytics
  • Azure Blob Storage
  • Azure Document DB Storage
  • Azure Logic Apps
  • Azure Web Apps and Jobs

An example architecture of how these components fit together is shown below.

Azure IoT Suite.png

It’s important to note that Microsoft do not provide a packaged cost for IoT Suite.  Each component would need to be priced individually.

I’m sure you will agree, quite a few moving parts, so let’s break it down into bite size chunks.

  • IoT Devices these could be individual items or they could use an IoT Gateway.  The best way to think about a IoT Gateway is a car, you wouldn’t send each individual electrical component out to the cloud.  Instead the car would act as the IoT Gateway and the components within the car send their telemetry to it.
  • IoT Hub massive ingestion platform which provides bi-directional communication to IoT Devices.  The IoT Hub performs the initial collection of data and stores it in Azure Storage Blob
  • Storage Blob used to store the data in it’s raw format.  Before the data is processed this is your one source of truth, using cheap cloud storage makese sense increase you want to integrate the data multiple times.
  • Steaming Analytics to integrate the IoT data in real time and also providing a secondary analytic method
  • Wep App providing the user interface for users to access the platform via a web page or on mobile devices
  • Logic App providing the integration points and workflows into business systems
  • Document DB is where the device meta data could be held

IoT Hub

IoT Hub is essentially the control plane, enabling IoT Devices to connect using AMQP, MQTT and HTTP protocols.  Communication to IoT Hub is based on service assisted communication patterns which are detailed in this excellent blog post.  Perhaps the most prominent points are:

  • Security takes place over all other capabilities
  • Devices do not accept unsolicited network information
  • The communication path is secured at the application protocol layer
  • System level authorisation and authentication are based on per device identities

From an IoT Device perspective, the IoT Hub is responsible for:

  • Sending data to the IoT Device
  • Receiving data from the IoT Device
  • Initiating file uploads
  • Receive an update twin properties (items such as location details)

The IoT Hub is responsible for the following areas:

  • Receiving data from the IoT Device
  • Sending data to the IoT Device
  • Receive delivery acknowledgements
  • Receive file notification
  • Device identity management
  • Device twin management
  • Jobs management

This can be logically depicted in the following diagram.

azure-iot-hub

Device Management

IoT Hub enables you to manage end devices to perform the following business as usual operations:

  • Reboot Device
  • Factory Reset Device
  • Configure Software on Device
  • Firmware Update Device
  • Reporting Progress (data waiting to be collected)
  • Reporting Status (last time data was collected)

The supported devices within Microsoft Azure which have been tested against Azure IoT SDKS can be found in this article.

Monitoring

IoT Hub offers the ability to monitor the status of operations in real time on the following metrics:

  • Device Identity
  • Device Telemetry
  • Cloud to Device Commands
  • Connections
  • File Uploads

For example the ‘Connections’ monitoring could be used to identify devices which fall outside of acceptable upload thresholds meaning that the device is likely to have a hardware failure.

High Availability

I have to say that I was somewhat impressed that IoT Hub has inbuilt regional high availability as part of the standard service offering.  The recovery time objective offered is between two and twenty six hours, so bear in mind that you could be down for over a day.

If an outage of up to 26 hours isn’t acceptable to your business, then you could consider implementing a secondary IoT Hub.  Some considerations around this include:

  • Fronting IoT Hub with Azure Traffic Manager on a Web App that that checks the active IoT Hub
  • Exporting and importing the device identity from the primary IoT Hub region to the secondary IoT Hub region on a regular basis
  • Fail back logic when the primary IoT Hub region is restored

How Is It Priced?

Microsoft use four tiers for pricing IoT Hub which are based around the total number of messages per day.  This includes messages both to and from IoT Devices.

The table below is taken from Azure IoT Hub Pricing and is correct as of 25/10/2016.

EDITION TYPE PRICE (PER MONTH) TOTAL NUMBER OF MESSAGES/DAY MESSAGE METER SIZE
Free Free 8,000 0.5 KB
S1 £30.55 400,000 4 KB
S2 £305.45 6,000,000 4 KB
S3 £3,054.50 300,000,000 4 KB

Even thought the table mentions monthly pricing, IoT Hub is billed per day.  This means that you can choose to scale up or down between paid tiers at will.  It should be noted that Microsoft does not scale you automatically, instead they apply quotas and limits if you are using to many messages on your scale.  In converse if you aren’t using enough messages per day then Microsoft will leave you on the same level.

One thought on “Microsoft Azure Concepts – Internet of Things

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s