The Nubix Orchestration Hub is the central home for application development and deployment in Nubix.
THE ORCHESTRATION HUB ALLOWS DEVELOPERS TO
Create and Deploy Containers
Pipelines are the key concept for developers and are used to collect, analyze, and manage data. Pipelines are then packaged into containers for deployment.
Pipelines and Containers
Pipelines are created in the Nubix Orchestration Hub using a drag-and-drop interface. Components are selected from the palette and a sequence for a data flow is created. The diagram below shows a simple pipeline.
In the above example, in the first stage of the pipeline data is collected from an ADXL345 accelerometer. The second stage is a custom code block that performs a shock detection algorithm. In the third and final stage, the GPIO Write capability is used to turn on an LED based on the value computed in the Shock Detection Stage.
In the Orchestration Hub, the source code for each stage is available by selecting the box for that stage. For example, here's what the code for a simple shock detection function would look like:
function M.execute(stageContext, metricsBatch)
local x = measurement:field('x')
local y = measurement:field('y')
local z = measurement:field('z')
--print('** shock measurement: ', tostring(measurement))
local magnitude = math.sqrt(x^2 + (y-1)^2 + (z-0)^2)
--print('** mag: ', magnitude)
if magnitude > 1 then
elseif magnitude > .5 then
elseif magnitude > .08 then
--print('** shock: ', tostring(measurement:field('shock')) )
The pipeline, with its custom code for shock detection, would then be packaged as a container for deployment. Visit the Nubix DevCenter to learn more about building and deploying containers.