As IoT systems grow ever more complex, developers are turning to microservices to architectures that make rolling out and updating IoT software faster, easier, and more secure.
A microservice architecture is a loosely coupled framework that uses virtualization to separate system software components into “containers.”
Figure 1 illustrates how Docker, one of the most popular containerization technologies, isolates the host OS from other applications, utilities, and third-party services, which are separated into individual containers.
Depending on footprint, the various services within a given architecture can reside in the cloud, fog gateways or servers, or on IoT edge devices themselves. This ensures that a particular piece of software functionality resides where it is most effective for the use case (Figure 2). Containerized software components typically communicate with one another through a standardized API.
The structure of container-based microservice architectures allows IoT developers to deploy software quickly, at scale, and without fear of disrupting software dependencies elsewhere in the system. It also ensures scalable, interoperable connectivity for new and legacy devices, as containerized protocol and networking support can be added based on the target hardware platform.
These features translate to faster, more iterative IoT software upgrades, more granular codebase management, and better utilization of software engineering resources.
Microservice Containers at the IoT Edge
Containerized software architectures originated in the enterprise, and enabled IT developers to securely separate applications and services running on the same hardware. As more computational power shifts to IoT devices to support increased functionality, containers are becoming an attractive option for edge deployments that require:
- Diverse protocols and data formats
- Varying levels of analytics capability
- Fast, iterative system upgrades
- Product differentiation and quick time to market
- Efficient use of resources
But microservice architectures operating at the edge must overcome challenges that don’t exist in the data center. For instance, as an architecture incorporates more microservices, more networking and communications are required, which adds latency.
More devices and services included in the architecture also introduce more potential points of failure and interfaces that need to be secured. Finally, orchestrating services across a growing number of distributed, heterogeneous devices and environments becomes increasingly complex.
To overcome these issues of containers at the IoT edge, Dell OEM and others launched the EdgeX Foundry microservice architecture.
Open, Agnostic, and Extensible Microservices for the Edge
The EdgeX Foundry is an open-source, vendor-neutral project hosted by The Linux Foundation that consists of more than a dozen hardware- and OS-agnostic microservices (Figure 3). The platform is designed to promote interoperability and fast time to market for vendors building differentiated IoT solutions. The microservices are deployed via Docker and Docker Compose.
The primary EdgeX Foundry microservices are divided into three categories:
- Device Services run on IoT edge devices or gateways, handling collection and communication of data from OT sensors. These services support a wide range of industry-standard protocols for quick integration of new and legacy systems.
- Core Services reside on gateway platforms or on-premises fog servers, and provide local data persistence, command functionality, and configuration information. Core Services also provide infrastructure required for more complex features like device monitoring and management.
- Export Services live on gateways, on-premises fog servers, or in the cloud, and transform, format, and filter data being sent to the enterprise. This is crucial for ensuring that OT sensor data is exported in formats like JSON that are compatible with enterprise data models.
In addition to these basic services, the loosely coupled EdgeX Foundry microservices architecture also supports optional services such as local analytics, security, scheduling, device management, alerts, and data logging, which can be added, removed, or tailored for the application at hand (Figure 4).
These microservices communicate with one another using REST APIs, which minimizes communications latency for real-time applications. And because EdgeX Foundry can support so many applications and services on a single hardware platform, fewer discrete systems are needed for comprehensive IoT deployments. As functionality is consolidated into fewer and fewer systems, security vulnerabilities and points of failure are also minimized.
Microcomputers for Microservices
EdgeX Foundry contributors continue to optimize performance of the architecture, with the goal of running Device, Core, and Export Service all on a single Raspberry Pi 3 device. The target startup time for this implementation is set at less than one minute, with sub-one-second latencies for data ingestion, processing, and actuation across the various service tiers.
The current containerized Core Services software footprint stands at 113 MB, with startup times below 10 seconds. This makes the EdgeX Foundry software stack more than compatible with systems like the Dell Edge Gateway 5100, which is based on the Intel Atom® E3825 processor with 2 GB of DDR3L-1067 MHz RAM, and supports a 32 GB solid-state hard drive.
Microservices Flexibility Anywhere at the Edge
For IoT developers, EdgeX Foundry’s loosely coupled, containerized framework means that required capabilities can be deployed quickly, at scale, wherever they make the most sense in an architecture. And perhaps more important, additional applications and services can be deployed without fear of disrupting software dependencies elsewhere in the system. This translates to faster, more iterative IoT software upgrades and more efficient, granular codebase management.
The other utilities of the EdgeX Foundry microservices architecture ensure scalable, interoperable connectivity between legacy and new devices, from the factory floor to the cloud. As a result, IoT organizations can get to market quickly with baseline functionality while reserving precious software engineering resources for value-added features, services, and innovation.
To learn more about microservice architectures and EdgeX Foundry, watch the on-demand webinar “A Microservice Approach to IoT Edge Computing.”
About the AuthorFollow on Twitter Follow on Linkedin More Content by Brandon Lewis