YOU ARE AT:DevicesA guide to building apps for the internet of things

A guide to building apps for the internet of things

Gartner’s estimate of 21 billion connected things in use by 2020 has developers switching their focus to become a part of the growing internet of things. 42% of IoT developers are currently building apps that uses sensors, and one-third of today’s IoT developers are building applications that require real-time data analysis and processing 50% or more of the time, according to Forbes. An Evans Data survey in July 2015 found that 17% of developers contacted were already working on applications for connected devices, while an additional 23% expected to begin working on them in the next six months.

What thing do you want, and what things should it do?

The use of the vague term “things” in IoT is referring to a massive group of items that can be connected through the use of sensors. Such unrestrained possibility means there is incredible opportunity to create a solution in just about any industry . But there are several considerations and best practices to go by before creating an IoT-ready application.
oil and gas IoT
The first consideration is figuring out the “thing.” What exactly is it that needs to be connected. Of course, if you are going to connect something you are also going to want an action done to that “thing.” So before creating an IoT solution you must answer two questions: What can be improved and how can it be improved? The internet of things is about making each and every thing around us as optimized as possible, which means nothing is out of the realm of becoming connected. Here are some industries that are early adopters of IoT solutions:

  • Transportation
  • Energy
  • Healthcare
  • Sports
  • Manufacturing
  • Smart Home

Each of these areas has many potential use cases, and each of those use cases has a number of different areas that need monitoring. Take, for example, the oil and gas industry and its need for sensors on oil pumps. Each of those oil pumps requires the tracking of water pressure, temperatures, flow rates, and many other metrics.
This means there are practically limitless applications for developers to create, but also adds complexity when dealing with APIs.

Time to practice

MakeUseOf/Youtube
MakeUseOf/Youtube

In this Industrial IoT 5G article on “How to become an IoT App developer,” we suggested prototyping using single core computers like Arduino or Raspberry Pi. This is as essential for someone new to coding as it is for a seasoned developer. In fact, IBM counts this prototyping as a best practice for producing an IoT application. Here are a few points from IBM about using these “mini-computers:”

  • Start with simple, off-the-shelf hardware. Although everyone thinks the Arduino is a hobbyist platform, it is cheap, produced well, and is reliable enough to rapidly produce something you can interact with. For a few dollars, you can determine whether your idea has any merit without investing in custom system board design.
  • Refine the prototype by using as many off-the-shelf components as possible. Keep it at a scale where it can be rapidly torn apart and rebuilt. Prototyping system boards, through hole components, and pluggable modules are great for this. Use components that are extremely well known, so you can prototype rather than get lost in implementation detail.
  • Decouple your critical components from the system boards that they connect with. Using components that use standard protocols, such as I2C and SPI, means that you can rapidly switch out your Arduino for a BeagleBone or a Raspberry Pi.
  • Rely on off-the-shelf hardware for as long as possible, before you decide to switch, and then think about it again.

Pick a platform

The process of gathering data from an IoT application has a lot of moving parts. It involves one or more sensors gathering data via a network connection, sending that data to an IoT application layer, which stores it or sends it to a different storage site either in an enterprise’s data center or the cloud.
This data is made available to the application for processing. Finally, end users access and interact with the application through something like a mobile phone or web interface.
Thankfully, there are a number of IoT-specific platforms that help with some of those processes. Companies like Xively, Thingworx, buglabs, Carriots, and SeeControl provide infrastructure to IoT applications. Each of these platforms offers different levels of control, but they all help enroll “Things,” and manage the massive amounts of data they collect.

Some best practices for building apps

There are several factors that make IoT applications unique. One of those is that the devices are always connected. This means developers must be very considerate of a few factors: power consumption, chip speed, memory, and firmware updates. They must also develop with a few best practices in mind, according to IBM:

  • Assume network failure at any point.
  • Write locally first, and then send the data.
  • On the service side, use message queuing systems such as RabbitMQ to process your messages.
  • Use lightweight and resilient protocols for messaging, such as CoAP and MQTT, rather than the heavier HTTP.

It is also a good idea to build an alert systems into the service so that you can diagnose when a node falls off the network for a length of time. And you must think in terms of scale, because you might have a few devices connected on one day and a few hundred thousand on another.

ABOUT AUTHOR