Lambdas offer a way for you to provide code that runs in response to an event.
In the cloud, lambda services are limited and can only respond to network events. In the On Prem Agent however, lambdas run within a high-performance low-latency control loop within an embedded Lua VM backed by Rust-native hardware bindings. This enables them to securely respond to high-frequency IoT bus events such as GPIO edge triggers, I²C, or even local network service events such as Redis or Kafka subscriptions.
One great use case for edge lambdas is to perform data acquisition at the source of the signal, and relay it to an edge Kafka service such as Redpanda. This is one way to maintain an independent "open data" (un-siloed) streaming architecture using storage services that you control, before relaying valuable data to proprietary managed IoT cloud services operated by hyperscalers.
Another use case for edge lambdas is to perform control that drives equipment. A lambda service can perform data acquisition at the source of the signal, classify the current situation in terms of k-means clusters such as ["normal", "warning", "alert"], and then drive equipment signals that control indicators or perform critical functions such as emergency shutdown.
Lambdas are triggered by customizable Lambda Trigger records that contain a Lua based control loop, making them infinitely extensible. Lambda Trigger templates exist for many use cases including timers, GPIO, I²C, Kafka, and Redis pub/sub. Embedded LuaSocket, Periphery, Kafka, and Redis modules provide Lambdas with many common hardware and network interfaces, securely implemented in Rust.
The On Prem Agent runs lambdas within 2 layers of security. First, lambdas are written in Lua, which limits the capabilities of any Lambda to the Lua sandbox security model and its limited VM bytecodes.
Second, embedded Lua modules such as LuaSocket and Periphery are written from scratch in Rust, bringing Rust's renowned characteristics to the table such as state-of-the-art memory safety, instead of relying on C code with related security and memory safety concerns.
Lambdas are edited via a cloud console designed for team collaboration.
Once a lambda is designated to run on a certain agent or set of agents, their configuration bundle is updated, and those agents will attempt to download and apply the new configuration as soon as connectivity permits. For agents heading into air-gapped environments such as factory floors or aircraft, this configuration step takes place during "factory burn-in". Once deployed, agents are 100% self-contained and run their own control loops autonomously, unless connectivity is permitted in which case agents will phone home to the control plane and pin up a tunnel used for reconfiguration, relaying of telemetry, and responding to control events.
