Four Fundamental Strategies for Building an IoT System

How can companies ensure that their Internet of Things technologies are sustainable and effective, work seamlessly, and create a return on investment?
By Joe Conway

Design a System With the Concept of Eventual Consistency
The most expensive transaction in an IoT system is a round-trip request from the user to the connected device. For that reason, it's important to minimize the number of round-trip requests. When controlling a connected device from a mobile application, this is unavoidable. However, if the connected device is set up to send values continuously to the server, a mobile client could read those values from the server instead of making a roundtrip to the connected device. A good approach is to keep the last known state of the connected device in a database. When client applications need to display values from a connected device, they are read from the database instead.

While this process might not serve up the most updated values, the system is designed to eventually get the most accurate information. In many scenarios, values change infrequently enough that approximate data is good enough and eventually will become accurate anyway. Likewise, for values that can change during the amount of time it takes to retrieve them, you will never receive real-time readings. One way to reduce this burden from the system involves catching device data on the server and defaulting the reading from that cache. When implemented, this strategy can reduce the amount of data that needs to be transmitted, which speeds up the system and minimizes data cost.

Plan for Dealing With System Pressure from the Very Beginning
In a distributed system, there will always be failures and downtime. When systems are interdependent and one part goes down, work can start to queue up, and it can either take a long time to be processed or become so taxing on the system that it will never be processed. Usually, when the system recognizes it's struggling, each component will halt operations. This typically means batching operations all together and waiting to emit those combined operations once the system has stabilized.

If a catastrophic event occurs that affects thousands of devices at once, mass reconnections add severe loads to the system. These loads can be so severe that it can take down the entire system again, creating a scenario from which it is impossible to recover. To avoid this situation, connected devices need to limit their aggression when reconnecting. The accepted best practice is to program connected devices to use a randomized exponential backoff strategy. When a device loses its connection to the server, it waits a random period of time before reconnecting. If it still cannot reconnect, the device continuously increases the amount of time it waits before trying again. This gives the system time to recover and avoids a catastrophic failure.

IoT systems are built to minimize the cost to control a device and also give the user increased visibility into the way it operates so he or she can take appropriate action. By applying each of these techniques, IoT systems have exponential power and opportunity to transform how your business operates, how you communicate with clients and how well these components work together.

Joe Conway is the founder and CEO of stable|kernel. He has worked with Fortune 500 companies, technology startups and government entities to build mobile platforms, enhance existing applications and develop mobile strategies. His team of developers at stable|kernel takes clients from strategy through design, development and deployment, ensuring timely delivery of the highest quality apps. Most recently, Joe led his team in the creation of Aqueduct for Dart, a server-side framework for Google's Dart. Before founding stable|kernel, Joe was a board member and lead iOS software engineer and instructor at Big Nerd Ranch. In 2012, he won the Jolt Productivity Award, presented annually to showcase products that have jolted the industry with their significance and made the task of creating software faster, easier and more efficient.

Simply enter a question for our experts.
Sign up for the RFID Journal Newsletter
We will never sell or share your information
RFID Journal LIVE! RFID in Health Care LIVE! LatAm LIVE! Brasil LIVE! Europe RFID Connect Virtual Events RFID Journal Awards Webinars Presentations