Predictions at the Edge

Engineered for Predictions at the Edge

EmcienPatterns is engineered to deliver continuous, high-accuracy predictions at the edge of the network, giving IoT devices the ability to sense future events and respond proactively in real time.

These key components combine to enable this edge analytics capability:

  1. A tiny footprint, which ensures compatibility with the smallest edge devices
  2. 2-tier architecture, which ensures prediction in the absence of internet connectivity
  3. Speed and scale mechanisms and automation, which ensure predictions on high-speed edge data are always timely
  4. APIs, small model size, and C programming language, which simplify orchestration

This document explores each of these components in greater detail.


A Tiny Footprint
Ensures Compatibility with the Smallest Edge Devices

The small sizes of both Emcien’s predictive model and Edge Prediction module (EPM) combine to create a tiny footprint that’s compatible with the smallest IoT devices deployed at the edge of the network.

Predictive Model Requires Very Little Storage Space

Emcien’s Analysis module (small footprint software) analyzes historical data and produces a predictive model in the form of a concise set of predictive rules.

The rule set is a representation of only the outcome-driving relationships in the data, so it’s very small. The rule set is about half the size of an iTunes song, and approximately 0.01% of the original data size.

As a result of its small size, the model can easily be exported to, and fit on, small edge devices which have limited storage.

Small Edge Prediction Module Requires Minimal Hardware

In order to generate predictions, the predictive model must be applied to new, streaming data received at the edge of the network.

Because all of the predictive intelligence resides in the model itself, and the task of applying rules to data is relatively straightforward, the EPM itself is a small C program.

This program is compatible with most devices because it has very minimal hardware requirements:

  • 700 Mhz ARMv6 processor (equivalent to Raspberry Pi)
  • 512 MB RAM
  • 16 GB HD (e.g. SD Card)

The diagram below illustrates a client implementation:

  • Multiple instances of the Edge Prediction module (EPM) have been spun up.
  • Each is installed on one of the client’s IoT devices at a remote client site.
  • The Analysis module has generated a small prediction model.
  • Multiple copies of the model have been made.
  • Each copy is sent to an EPM on an IoT device.
  • The EPMs apply their copies of the model to the new data collected by the IoT devices.
  • The EPMs generate predictions about critical events (i.e. equipment failure).
  • The devices use the predictions to respond in real-time, preventing predicted events from occurring.

2-tier Architecture
Ensures Prediction in the Absence of Internet Connectivity

Emcien’s 2-tier architecture ensures that both the Analysis module and Edge Prediction Module are able to work independently of one another. As a result, the EPM can continue to generate predictions when internet connectivity – and thus communication with the Analysis module – is lost.

The Analysis module updates the predictive model – a set of predictive rules – when the data changes, and passes the new model to the EPM. The EPM then uses it to generate predictions.

But in edge/IoT use cases, where connectivity is not a constant, the Analysis module is not able to pass the new rule set to the EPM.

Yet, predictions do not cease in the absence of an internet connection. Instead, the EPM is able to continue to generate predictions on new data because it can still use the previous rule set – the rule set that was last passed to it by the Analysis module.

As soon as connectivity is restored, the Analysis engine is able to pass the new rule set. The EPM can then use it to generate predictions.


Speed & Scale Mechanisms Plus Automation
Ensure Predictions on High-Speed Edge Data Are Always Timely

Speed and scale mechanisms combine with automation capabilities to produce continuous, high-speed predictions that easily keep pace with fast-moving edge data. As a result, devices can respond quickly and prevent critical events from occurring.

Speed & Scale Mechanisms Ensure Predictions are High Speed

First, EmcienPatterns has been carefully designed to deliver enterprise-grade speed and scalability.

At 1,000 predictions per second on a single core, EmcienPatterns can analyze and predict on the highest speed edge data with ease.

Learn more about the mechanisms that deliver this level of performance in our Speed & Scale technical document.

Automation Means Predictions Never Stop

Just like the Analysis module, the Edge Prediction module can be automated so that it works continuously to apply the predictive model to new data.

Because it never stops to take a break and needs no human intervention, the EPM is never behind on predictions.

It never amasses a backlog of old transactions or events or records to which the model must be applied in the future.

Instead, the moment new data is available, the EPM applies the predictive model and generates a prediction, ensuring there is never any insight lag.


APIs, Small Model Size & C Programming Language
Simplify Orchestration

Our software’s APIs, the small size of our predictive model, and our use of the C programming language in our Edge Prediction module simplify the client’s orchestration of the full edge prediction process.

APIs Make It Easy to Access the Predictive Model

Once the Analysis module updates the predictive model, this new rule set is needed by the Edge Prediction module (which must be installed by the client on their remote devices) so that it can generate predictions at the edge.

EmcienPatterns makes this rule set available through its RESTful APIs. As a result, the client can access it easily.

Model Is Small, Making Transport Easy

What’s more, because the model is extremely small, at about half the size of an iTunes song, it can be transported in a variety of ways.

No big file synchronization or other complex process is needed to transport the model. Rather, transport can be as simple as a web request.

C Programming Language Makes EPM Easy to Install

As previously described, the program that runs the Prediction Module is a simple C program. As a result, it’s quite small and will fit on a small remote device, making installation easy.

Additionally, because C is a universal, cross-platform language, it is compatible with virtually any edge device, further simplifying the installation process.


EPM Step-by-Step Directions for EmcienPatterns 2.21

To see EPM in action, follow the below directions. These directions assume EmcienPatterns version 2.21

Setup

Below are the few steps required to get to EPM on the virtual machine. It is suggested to setup a SSH key to interact with the EmcienPatterns virtual machine (VM). SSH Key setup directions can be found here.

Once logged into the VM as the `system` user please run the following commands

Installing Pre-requirements

system@localhost:$ sudo apt-get install socat

Only need to run this command the first time you use EPM

Changing Users

system@localhost:$ sudo su emcien-vm

You will be interacting with EPM as the `emcien-vm` user

Creating the UNIX Socket

emcien-vm@localhost:/home/system$ cd ~/data/engines/

Location the directory with the most recent timestamp (if more than one directory).

emcien-vm@localhost:/home/system$ ~/data/engines/#{UUID}/licensed_engine/stamper -i epm_socket -r /home/emcien-vm/data/reports/#{REPORT ID}/prediction_rules.dat &

This step creates the socket and places it in the Bash background. There are a few pieces of information you will need to run this command:

  • #{UUID}: This is your Emcien license ID. This ID is the same value as the most recent directory in the engines location.
  • #{REPORT ID}: This is the ID from the Analysis Engine that contains the prediction rules. Locate this in the web application (or the URL bar in your browser).

Creating Test Transaction

Create a file in your current directions named `transaction.json`. This file will be used as the input for EPM. Emcien will make a prediction based on this data. This file must be in the Emcien JSON format.

Calling EPM

emcien-vm@localhost:/home/system$ printf "\x`printf %x $(($(wc -c < transaction.json) - 1))`" > /tmp/tlen.txt && truncate -s 5 /tmp/tlen.txt && cat /tmp/tlen.txt transaction.json | socat - GOPEN:epm_socket

This is the pure UNIX way of executing EPM. Emcien can provide a C helper client. It is also easy to write a Java or C# client to simplify the call.

At this point you have successfully made a prediction using EPM.