D3

Report 16 Downloads 400 Views
Create a Hello World with Data in Motion Lionel Hunt PSOIOT-2003

How to Develop and Deploy Fog Apps Data in Motion Case Study

Agenda •

Introduction



Paradigm Shift At the Edge



Examples and Use Cases



Programming Data in Motion



Create a Hello World Now



Q&A

Introduction

Data in Motion and IoT •

The Internet of Things (IoT) is a computing concept that describes a future where everyday physical objects will be connected to the Internet and be able to identify themselves to other devices.



Cisco Data in Motion (DMo) is a software technology that provides data management and first-order analysis at the edge.



Cisco Data in Motion provides mechanisms to capture data and control flows within the network translating data into information and ultimately into knowledge for use by higher order applications within a system.

Paradigm Shift with Edge Intelligence Network

Compute

Storage

Unified Platform EDGE

STORE

CLOUD

ANALYZE

CLOUD

ACT

NOTIFY

Examples and Use Cases

Railway Systems

Fear of Derailment

Underutilized Equipment

Immediate Response to Equipment Failure

Real-time Health Status of Trains CAR 07 REPLACE BEARINGS

Poor Leak Detection

Limitations in Network Connectivity

Costly Maintenance and Management

Proactive Leak Detection

S6 | C026

kPa Pressure Drop

ACTION REQUIRED

Predictive Management

ENERGY USE

HIGH

LOW

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

ENERGY USE

HIGH

LOW

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

20-30% Energy Cost Savings

FRIDAY

Programming Data in Motion

Data In Motion Model (details) •

Context: Sandbox for an application with separate URP allowing for the creation and interaction of multiple data analysis operations.

Context D3

D3

D3

D3

D3

D3



Dynamic Data Definitions (aka D3): A set of patterns, rules, and actions for a specific analysis task. Multiple D3s may exist within a single context and reference each other for compound or recursive analysis. D3

The D3 Model (details) •

Dynamic Data Definition involve the relationship of three simple concepts

D3 Pattern Protocol Patterns Condition Content (aka Payload)



Pattern • Condition • Action

Parameters – Output of Operations Action Event (Condition Met)

Call Another D3 within Context Send to Dynamic Data Stream Dynamic Data Request Timer Call Another D3 within Context Send to Dynamic Data Stream Dynamic Data Request

D3

The •

D3

Meta (1)

Model (details)

Dynamic Data Definition involve the relationship of three simple concepts

D3_Id, Context_ID, Processing Method (Timer, Cache) Network (01) Filterby: (protocol {tcp/ip, UDP} Source/Dest IP, Source/Dest Port (multiple ANDed) Decode: (variable A=first 8 Bits, var B=next 16 bits, etc….) Application (01)



Filterby:

Pattern • Condition • Action

Protocol: http Field: content-type:json, etc. Content Example: variable Temperature>56 Action (>1)



Ultimately this breaks down into:

Type: Primitive



Meta information • Network definition • Application to monitor • Action(s) to take

payload

Header Type: Procedure FetchData Gpsupdate() syslog

Type: Timed FetchData Gpsupdate() syslog

D3

The •

D3

Meta (1)

Model (details)

D3_Id, Context_ID, Processing Method (Timer, Cache) Network (01) Filterby: (protocol {tcp/ip, UDP} Source/Dest IP, Source/Dest Port (multiple ANDed)

Putting it Together

Decode: (variable A=first 8 Bits, var B=next 16 bits, etc….) Application (01) Filterby:

Cloud DataCenter

Protocol: http Field: content-type:json, etc. Content

{JSON : { Rules can express:

Example: variable Temperature>56 Action (>1)

Sensors

Predicates and Filters Data / Information conversion Summarization Pattern Matching Categorization & Classification Event Trigger analysis Notifications }}

Type: Primitive

payload

Header Type: Procedure FetchData Gpsupdate() syslog

Type: Timed FetchData Gpsupdate() syslog

Data in Motion API as an Open Source Project •

Krikkit initiative originates from Cisco Data in Motion project   



Promotion of Data in Motion products and Data in Motion proliferation across industry Maintain Leadership in industry for IoT efforts IoT does not have many Standards and Open Source is way to accelerate IoT innovations with Cisco products Krikkit is the public API for Data in Motion »http://eclipse.org/proposals/technology.krikkit/

www.slideshare.net/kartben/whats-new-at-eclipse-iot-eclipsecon-2014

Create Hello World with Data in Motion

Login To DMo Login Page Point your browser to the IP address unique to your workstation http://[your unique IP]:8000

Requires an IP address of the DMo instance, the port number, a context and the associated password: IP: 127.0.0.1 Port: 443 Context Name: dmolab Context Password: dmo123

Clean Start An Empty Context We need to make sure there are no pre-existing rules.

A Programmed Context if your screen looks similar to the screen below, please click the Trash Can Icon and Delete rules.

Create a Timer Rule Polling a Sensor Most Real life sensors are Asynchronous, as a result, we need to create a timer rule that will poll the sensors to retreive the Data. A timer rule is a process that runs periodically (units in millseconds and above) and estabishes a connection to the sensor.

Verifying the Timer Rule The JSON Payload if you want to see what the resulting JSON code would look like, you can press the 'see JSON' button.

Create an Event Rule Turn LED ON Now that we have Setup a Timer Rule and we are polling the Sensors for Data. We will need to create an Event Rule to apply a filter to the data coming back from the sensor and take action depending on the data value. • Filter Data • Turn LED OFF [output Port0] when light Sensor [input Port1] is Dimmed [Value < 100]

Create another Event Rule Turn LED OFF Now that we have turned the LED ON when Dimming the light on the sensor, we would like to turn the LED back off when the Light Sensor is lit • •

Filter Data Turn LED OFF [output Port0] when light Sensor [input Port1] is not Dimmed [Value > 100]

Bonus Lab •

Setup a Rule that will turn the LED ON when Pressing on the Pressure Sensor [Pressure Threshold > 10]



Setup another Rule that will turn the LED OFF when depressing the Pressure Sensor [Pressure Threshold < 10]



Useful Information



LED is on [Output Port 1]



LED value 0 Turns OFF



LED value 1 Turns ON



Pressure Sensor is on [Input Port 1]

Thank you