I am proposing the creation of a lightweight, small-resource footprint software component that can be deployed on “edge” devices such as IoT Gateway boxes or similar. Target environment resource specifications are; 1 CPUs, 1 GB RAM, 4GB Flash storage, and a 1 Gbps NIC.
The current Pulsar function runtime environment is located on a Pulsar Broker instance, which is typically deployed in a corporate datacenter or public cloud provider, behind a firewall. This introduces a significant amount of latency from the time an event was generated until the time a Pulsar function is able to act upon it.
Therefore, it would be desirable to create a software component that provides an environment for running Pulsar functions in a resource constrained environment.
In the desired state, we would be able to host simple Pulsar functions on the IoT Gateway device itself, much closer to the event source. This allows us to perform functions such as filtering, alerting, message prioritization, or even probabilistic algorithms with small memory requirements such as Bloom Filtering, Top-K, event frequency, distinct element counts, or anomaly detection based on t-digest.
Events can still be forwarded to the downstream Pulsar cluster for longer-term storage, and additional Pulsar function execution.
The Pulsar Edge Component should have the following capabilities:
The Pulsar Edge Component will wrap a standard pulsar client object, that it will use to forward the events to the Pulsar Cluster. It will also have the same pub/sub API as the Pulsar Client. The Pulsar edge component should also provide a mechanism for enabling message batching prior to transmitting them over TCP to the Pulsar cluster. This will provide useful in high-volume environments when we want to improve throughput.
IoT applications would be used to capture the sensor data that is transmitted to the ioT gateway device over short-range protocols such as ZigBee, BlueTooth, convert it into the desired format, and publish it to the Pulsar Gateway object using the pub/sub API.