Published: 16.05.2023
Introduction
StaexD is an additional component to Staex flagship product —
MCC, an overlay peer-to-peer network. If you want not only
manage the network but also
manage the software that runs on top, this component is for you. StaexD is similar to Kubernetes function-wise but heavily optimized for resource-constrained IoT devices. In addition to that StaexD is fully-distributed, meaning that there is no coordinator node and control plane — the whole MCC network is used as a control plane and each node can manage services and batch jobs the same way as other nodes. Let's find out which features distinguish StaexD from existing solutions.
Service orchestration
StaexD allows to deploy and run applications on any node in your IoT device fleet. The application can be a
native application available through operating system that runs on your devices or a
Docker container available through a container registry. Docker containers are too resource-consuming to deploy them on the devices, but are ideal for cloud servers that manage the IoT device fleet, whereas native applications are ideal for resource-constrained devices that can only run software specifically tailored for a particular device. StaexD supports both to provide unified system management interface for each node in your network be it a server or a device.
Select nodes by tag
In IoT fleets devices are likely to have different architectures, and you usually want to deploy architecture-specific versions of software packages to each device. StaexD solves this problem by allowing a user to assign arbitrary tags for each node. You can tag x86 nodes as x86, tag ARM nodes as arm64 etc. Then you can address the node to which you want to deploy your software package by tag, and StaexD will find a node with matching tags and deploy the software there. Another possibility is to find all nodes matching specific tags and deploy the same software to each of them. The tags are not limited to architectures, and you can use them to mark devices in certain location or having certain roles in your system.
Flexible resource system
Another problem that is more relevant for IoT fleets rather than cloud servers is the ownership of resources. If one application uses a built-in camera or even a board pin, then it is an error to use the same camera or the pin by other applications. StaexD solves this problem by allowing a user to assign arbitrary key-value pairs to each node. You assign each resource a key and a value of one, meaning that only one application at a time is allowed to use the corresponding resource. When you launch your application through StaexD you specify the same resources as the requirements for the application. When the application runs on the node, the corresponding values are decremented, and StaexD will allow to run more applications on the same node only if there are enough resources available. The resource system is quite flexible, and we anticipate our clients to find creative solutions to their specific problems using this system.
Periodic batch jobs
IoT devices like cloud servers require means to do manual and automatic maintenance. StaexD offers batch command execution which is usually faster than SSH because there is no interactive session. For automation StaexD offers calendar-based batch job execution (e.g. every day, every month, on specific dates). Resource system is also integrated with this functionality, enabling a user to select specific nodes that need maintenance and updates and ignore other ones.
Conclusion StaexD is an add-on to MCC, a cherry on top if you will, that automates service orchestration and batch job scheduling for IoT devices. It is not for everyone, but if your use case involves deploying a lot of software on a multitude of device architectures, then you should definitely give it a try!