Straight talking 66

by Tim Anderson

Microsoft Azure and Amazon Web Services are natural choices for the back end of an IoT solution. Tim Anderson delves deeper.

HardCopy Issue: 66 | Published: June 1, 2015

Mention IoT and you think immediately of the ‘things’ – the sensors, smart appliances, wearables, and things that we have not thought up yet that will inevitably be internet connected. However the value only comes though when you have the right services in place, which is why IoT is as much about the cloud as it is about devices and sensors. Cloud is not essential, since you can host services in your own data centre, but there are real advantages: scalability, easy access to database and analytics services, and the freedom of being able to focus on the application rather than the infrastructure in your solution.

There is also a natural affinity between IoT and apps running on smartphones or tablets. The value of always-connected devices increases if you can monitor or control them on the move, and that implies mobile. Cloud services make sense since they can make it easier to let your mobile app services communicate with your IoT services.

Another factor is that few IoT applications stand alone. In the early days of the internet there was excitement about ‘mash-ups’: applications which combine data from multiple sources to add value. IoT fits well with the mash-up concept, and it is easy to think of applications which combine data from sources such as maps, traffic and weather with that from IoT devices.

Azure Machine Learning Studio screenshot

The Azure Machine Learning Studio in action.

Research company Vision Mobile surveyed 4,000 IoT developers in a report published in the first quarter of 2015.This demonstrated the affinity between mobile and IoT, with 53 percent of mobile developers already involved in IoT development. The top five IoT targets were Smart Home (75 percent), Wearables (75 percent), Connected Car (50 percent), Retail (45 percent) and Industrial IoT (44 percent), where the percentages combine those currently targeting and those intending to target the specified areas.

This suggests that the ideal platform for IoT services needs strong support for mobile apps as well as for services that communicate with the devices themselves.

Another key feature is the ability to consume large amounts of data and to enable analytics. The amount of data is often hard to predict, making the scalability of cloud services an advantage. As sensors evolve and multiply in number, the amount of data generated can only increase. Stuffing data into a traditional SQL database may not be the best solution. A data warehouse such as something based on Apache Hadoop, which is designed for analysing large amounts of data efficiently, may be more appropriate.

If you are building a real-time solution, such as a dashboard, then the objective is to make sense of a stream of data without necessarily storing it, which has given rise to services offering streaming analytics. For example, manufacturers can use data from machines in production to monitor performance and troubleshoot problems proactively, even before the customers on-site report a problem.

Given the synergy between cloud and IoT, it is no surprise that the big public cloud providers have come up with suitable services, such as those from Microsoft Azure and Amazon Web Services. Note that these are large platforms, and potentially any of their services might find a role in an IoT solution, so the services highlighted below are not intended to be exclusive.


IoT Services on Microsoft Azure

Microsoft Azure has seven services which form the basis of its IoT offering:

  • Azure Event Hubs consume and process events fired over HTTP or AMQP (Advanced Message Queuing Protocol) with high throughput.
  • Azure Document DB is a NoSQL database which stores JSON documents and lets you query them with SQL, JavaScript or Hadoop jobs (with a connector). It is backed by SSD storage for performance.
  • Azure Stream Analytics uses a SQL-like language to analyse streaming data and optionally output to Azure storage. It integrates with Event Hubs.
  • Azure Notification Hubs send push notifications from Azure to iOS, Android, Windows or Windows Phone.
  • Azure HDInsight is Microsoft’s Hadoop implementation, and can also connect to on-premises Hadoop instances.
  • Azure Machine Learning lets you create and operate predictive solutions. You can build workflows in Machine Learning Studio, publish them as web services, and extend them using modules written in R or Python.
  • Microsoft Power BI is a cloud service for sharing and collaborating on Excel reports.

It is also worth mentioning Azure App Service, which replaces Azure Mobile Services and lets you build services for mobile apps, including authentication with Azure Active Directory, Microsoft accounts, Google, Facebook or Twitter and REST APIs, and of course access to other Azure services.

In March 2015, Microsoft announced the Azure IoT Suite, expected to preview shortly, which will provide complete applications targeting common IoT scenarios such as remote monitoring, asset management and predictive maintenance.


IoT Services on AWS

Amazon Web Services (AWS) also offers services suitable for IoT solutions:

  • Amazon Kinesis captures and processes data from multiple sources in real time to create dashboards and alerts, or feed data into other services for later processing. The Kinesis Client Library lets you build applications in Java, Python, Ruby or Node.js.
  • Amazon EMR (Elastic Map Reduce) is a data warehousing service that uses Apache Hadoop.
  • Amazon Redshift is a high-scale data warehouse which supports PostgreSQL, JDBC and ODBC clients, so you can analyse data using existing tools.
  • Amazon Simple Notification Services lets you send push notifications to Apple, Google, Fire OS and Windows devices.
  • AWS Lambda is a fully managed compute platform for running code in response to events, using either Java or Node.js. You can use Lambda in conjunction with Kinesis to process IoT events.
  • AWS Mobile Services is not a service as such, but rather an SDK for iOS, Android, Fire OS
    and Unity for building apps that access AWS services including S3 storage, Dynamo DB NoSQL database and AWS Lambda.

There is also Amazon Machine Learning, a newly announced service for predictive analytics based on the concept of models and predictions. You give Amazon Machine Learning a model, which is a dataset including both data and outcomes. You then supply data and it will predict outcomes with an indication of confidence. Machine Learning can use data in Amazon S3, Amazon RedShift or Amazon Relational Database Service.


Azure or AWS?

Both Azure and AWS are strong for IoT solutions, so why would you choose one over the other? It is apparent when you review the documentation that – as you would expect – Azure has better support for Microsoft-platform technology such as Azure Active Directory, C# SDKs, Excel analytics, and Windows devices (including Windows Phone), although Microsoft does also support Linux, iOS, Android and other important platforms. AWS does not provide C# SDKs for all its services, but fits well with open source technology such as Linux, Ruby, Python and MySQL. Use of REST APIs and other standards mean that you are not limited on either platform, but it is worth bearing in mind. That said, AWS is a more mature platform and the largest public cloud provider.

The individual services vary, especially in the more cutting-edge services such as machine learning, so it would pay to run trials to test the capability of these services in the context of a particular application.