With Balena, Resin.io Makes IoT Case for Containers

While there’s a lot of interest internet of things (IoT) projects, there’s not much consensus when it comes to the best way to go about building these applications. The types and classes of processors and operating systems available for use on an endpoint or IoT gateway are seemingly endless. There’s clearly a need for a layer of virtualization to abstract away all the underlying IoT complexity. The trouble is that most hypervisors are too heavy and cumbersome to manage in an IoT environment.

To solve that issue, Resin.io has created balena, an instance of container environment based on the technologies that Docker has made available via the Moby Project, an open-source instance of the container platform technology Docker Inc. used to create the Docker platform. Compatible with Docker container images, the balena engine provides a much-needed common later of abstraction and application programming interfaces (APIs) across multiple IoT platforms using a common container platform, says Resin.io CTO Petros Angelatos.

Given the processor and memory limitation of IoT devices, Angelatos says deploying hypervisors across IoT environments isn’t practical as a lightweight container. Of course, there’s no reason a container can’t be deployed on a hypervisor running on an IoT device. But Angelatos notes that just creates additional layers of software infrastructure that must be maintained and secured.

In contrast, Angelatos says balena is a single binary 3.5 times smaller than existing Docker Container Engine images. In addition, balena is anywhere from 10 to 70 times more bandwidth-efficient than the standard layer-based Docker pull.

Other IoT-specific capabilities include support for atomic and durable image pulling, which prevents containers from becoming corrupted if power is lost and prevents page cache thrashing in environments where devices have limited amounts of memory. There also support for build-time volumes to enable more flexible construction of workflows and on-the-fly extraction of pulled layers that avoids having to write the compressed layer to disk, thereby improving I/O performance.

Angelatos says optimizing a container platform for use in IoT applications make sense, because it’s not uncommon for the devices at the edge of an IoT network to have access to more than a 3G wireless network.

To streamline the balena container platform, Angelatos says Resin.io decided to abandon Docker capabilities not required at the edge of an IoT environment, including Docker Swarm, support for plugins, cloud logging drivers, overlay networking drivers and stores such as etcd, consul and zookeeper. In fact, balena is only available for devices running Linux.

It’s already apparent containers will have a big role to play in fostering the development of IoT applications. Less clear is what how those containers will manifest themselves. Most of the container technology that has been widely deployed so far is optimized for data centers, rather than devices that only have an intermittent connection to the internet. Ultimately, however, it may very well turn out the number of containers running at the edge of the IoT network will dwarf anything ever imagined in the data center.

Mike Vizard

Mike Vizard is a seasoned IT journalist with over 25 years of experience. He also contributed to IT Business Edge, Channel Insider, Baseline and a variety of other IT titles. Previously, Vizard was the editorial director for Ziff-Davis Enterprise as well as Editor-in-Chief for CRN and InfoWorld.

Mike Vizard has 1439 posts and counting. See all posts by Mike Vizard