Skip to content

BLOG

Keep the Edges Dumb: Business Logic for IoT Sensors

Whether it’s the performance of your manufacturing equipment or the health of your crops, IoT (Internet of Things) technology can provide valuable insights into how to make your business more efficient and productive. But what does this look like in practice?

A typical IoT infrastructure consists of multiple tiny IoT sensors out in the field, each one capturing data. In the center of this diagram is the cloud, which receives the sensor data and performs advanced computation. Depending on the use case, there may also be an intermediate device known as the “edge computer” or “hub” that takes the information from these sensors and transmits it to the cloud.

Here at Very, we believe it’s an IoT best practice to “keep the edges dumb” by restricting as much processing and analysis to the cloud as possible. In this post, we’ll discuss why this is a good idea and what it means for your own IoT deployment.

IoT Sensors and Edge IoT

IoT sensors convert the continuous outside world into discrete raw data that you can more easily analyze. A sensor is typically a simple device no bigger than the palm of your hand. Each one is specialized for a particular function: measuring quantities like temperature, humidity, light, and air pressure, detecting motion, and so on.

The most common technologies for IoT sensor communication are the 900 MHz radio band and Bluetooth; some may also have a hardwired connection to the edge computer. Each transmission from the sensor is small and fairly useless on its own unless combined with other measurements and information. From these IoT sensors, the data is sent to the edge computer, which has an Internet connection and sends this information to the cloud.

Depending on your IoT architecture, you may not require an intermediary edge computer-for example, if each individual sensor already has Wi-Fi or cellular connectivity. In this case, each sensor can be considered as its own “edge” device.

IoT developers have the most control and flexibility over the cloud-based portion of the IoT infrastructure. This control decreases as you travel further toward the edges of the IoT network. In fact, you may not even be able to access or update an IoT sensor once it goes out into the field. As you move away from the cloud, you need a stronger guarantee that a device’s behavior will be straightforward and reliable.

Updating IoT sensors can also be prohibitive in terms of bandwidth, especially on a cellular network. The price point is so small for these devices (sometimes less than a dollar) that it’s not worth it to spend the time on enabling firmware updates.

Business Logic for IoT Sensors

Suppose that you run a chain of retail stores and you want to know how many customers are passing by a particular product every day. To do so, you might decide to measure the number of people who visit the aisle in which the product is stocked.

Using a traditional security camera would require you to review hours and hours of surveillance footage, creating a manual (and error-prone) count of the customers in that aisle. Fortunately, IoT infrared sensors for motion detection can make this task dramatically easier and more automated.

Whenever it detects motion, an IoT sensor can send information about the current time and location. This raw data then needs to be cleaned up, collated, and analyzed in order to become human-readable and useful.

In most use cases, this sort of computation should be performed in the cloud, and not on the edge computer. The role of the edge device should only be to pass the sensor data along to the cloud in a secure manner, as well as making any time-sensitive decisions. (For example, if a sensor detects motion when the store is supposed to be closed, it might be advisable to alert the manager and store owner.)

Here at Very, we worked with one of our clients to build the world’s first self-serve beer kiosk powered by facial recognition technology. Of course, computation-heavy tasks such as the facial recognition itself need to be performed in the cloud.

However, the edge computer also needs to control the machine’s tap locally and in real-time. This allows the machine to cut off the beer when customers pour too much or have too little money in their account. In addition, local control of the tap enables the machine to be easily shut down for maintenance when necessary.

As Dumb As Possible, But No Dumber

Your IoT edge devices should be kept at the right degree of complexity: as simple as possible, yet also with the proper functionality they need to do their jobs.

The benefits of “keeping the edges dumb” in IoT include:

  • Higher performance: IoT edge devices are fairly small and can’t match the virtually unlimited compute power of the cloud.
  • Better security: Having physical access to an edge device may put your IoT data at risk; in most cases, your information is more secure in the cloud, where data centers are kept under lock and key. If sensitive or confidential data is passing through the edge device, then encryption is highly recommended when transmitting it to the cloud.
  • Lower costs: Keeping your edge lightweight allows you to use cheaper hardware, which saves on the total cost of the IoT project.
  • Easier debugging: Cloud services typically have rich error reporting features that help you determine when things go wrong. If you put complicated business logic on the edge, however, it can be harder to detect and diagnose failures.

Considering the Tradeoffs in IoT Architecture

Throughout an IoT development project, you’ll have to make the tradeoff between performance and network latency. Pushing all the computation into the cloud is much faster and gives you more control, but it also comes at the cost of higher delays in communication.

Deciding which business logic should run in the cloud, and which needs to be moved down to the edge is therefore a highly important question. If you need help, speak with a qualified and knowledgeable IoT development firm.

Want more information about how the IoT development process works from start to finish? Check out our totally free complete guide to IoT development.