DEVNET-1068
An Introduction to Developing
for Cisco Kinetic
Krishna Chengavalli
Technical Marketing Engineer IoT Software
Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session
How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space
[Link]/ciscolivebot#DEVNET-1068
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Agenda
• What is IoT?
• Cisco Kinetic IoT Platform
• Developing for Cisco Kinetic Data Control Module
• Walk Through
• Summary
To get value from data
App
App
App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
And these things and apps are distributed
App App App
App
App
App App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Customers are challenged!
App App App
App
App
App App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Cisco Intent-Based Network is needed
App App App
App App
App
App App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
But customer challenges remain…
Complexity of connecting, securing Cisco Intent-Based
and managing a set of diverse devices
Network
A lot of data remains locked inside its sources
No programmatic way to move the right
data to the right apps at the right time IoT Data Fabric
No programmatic way to enforce ownership, privacy, and is needed
security policies
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
An IoT data fabric is needed
App App App
App App
App
App App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
An IoT data fabric is needed
App App App
App App
App
System of distributed software that
extracts data, computes data, and moves data.
App App
App
App
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Cisco Kinetic unlocks your data
Extract Data Compute Data Move Data
Compute data to
Move data
Extract data from transform it, apply rules,
and perform distributed programmatically to
its sources and
micro-processing from the right applications
makes it usable.
edge to endpoint at the right time.
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Cisco IoT
Extract Data Compute Data Move Data
IoT Data Fabric
The Network. Intuitive.
Intent-Based Network
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Cisco Kinetic Platform
Extract Data Compute Data Move Data
IoT Data Fabric
Gateway Edge & Fog Data
Management Module Processing Module Control Module
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
The Cisco IoT Product Portfolio Organization
Implementation
Methodology
Vertical Market
Applications
Cloud Data
Services Cisco
Fog Data
Kinetic
Services
Manage
Device Communication
Collect Application
Connect
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
Container SIM
1 Gateway
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
3 Scanning / Claiming
App App App
Cisco Kinetic
App App App
3
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
3 Scanning / Claiming
App App App
4 Call Home / Register
Cisco Kinetic
App App App
4
3
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
3 Scanning / Claiming
App App App
4 Call Home / Register
Cisco Kinetic
App App App
5 Gateway Provisioning
5
4
3
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
3 Scanning / Claiming
App App App
4 Call Home / Register
Cisco Kinetic
App App App
5 Gateway Provisioning
6 5 6 Edge / Fog App Download
4
3
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
1 Gateway Power On
2 Field Tech App
3 Scanning / Claiming
App App App
4 Call Home / Register
Cisco Kinetic
App App App
5 Gateway Provisioning
6 5 6 Edge / Fog App Download
4
3
7 Connect to Devices / Sensors
Container SIM
1 Gateway 2
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Cisco (IoT Cloud Service): Gateway Management
How Kinetic works ?
Predictive Technician Machine New
Maintenance Toolkit Analytics Service Creation
1 Gateway Power On
9
2 Field Tech App
01010 01010
3 Scanning / Claiming
App App App
101010101 4 Call Home / Register
010101010 Cisco Kinetic
App App App 101010101
5 Gateway Provisioning
6 01010101010 5 6 Edge / Fog App Download
4
3
7 Connect to Devices / Sensors
Container SIM
1 Gateway 2 Data Gathering, Processing,
8 API to Applications
8
9 Cisco or 3rd Party
Applications
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Empowering the Edge
Compute Inside the Network
Data Center / Business
Applications
Cloud Management Analytic
Systems
IoT
Applications Billing
Microservices
Edge / Fog Edge / Fog
Processing Processing
• Optimized hardware footprint • Empowered edge
• No need for separate processing
compute machinery • Reduced latency &
• Integrated security bandwidth cost
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Cisco (IoT Cloud Services)
Services for the Cisco IoT Network
IoT Services
Fog Computing
Fabric
IP Network
Distributed Computing Built into the Network, Served by the Cloud
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Cisco (IoT Cloud Services)
Services for the Cisco IoT Network
• Gateway Management
(covered in earlier slides)
IoT Services
Fog Computing
Fabric
IP Network
Distributed Computing Built into the Network, Served by the Cloud
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Cisco (IoT Cloud Services)
Services for the Cisco IoT Network
• Gateway Management
(covered in earlier slides)
IoT Services • Remote Access
Fog Computing
Fabric
IP Network
Distributed Computing Built into the Network, Served by the Cloud
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Cisco (IoT Cloud Services)
Services for the Cisco IoT Network
• Gateway Management
(covered in earlier slides)
IoT Services • Remote Access
• Application Management
Fog Computing
Fabric
IP Network
Distributed Computing Built into the Network, Served by the Cloud
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Cisco (IoT Cloud Services) “Brokering” Data
Distribution
Services for the Cisco IoT Network •
•
By Source
By Content
• By Rules
• By Policy
• Gateway Management
(covered in earlier slides)
IoT Services • Remote Access
• Application Management
• Data Routing
Fog Computing
Fabric
IP Network
Distributed Computing Built into the Network, Served by the Cloud
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
An Open System
Cisco Networking
3rd Party +
M M M M M M M M M M M Gateway &
C++ C Java Javascript Python Ruby Dart Scala
Connection
Management
+
Time-Series
Historian Database Event Stream Gateway Connectivity Microservices
Filtering Correlation Aggregation (ParStream) Processing Management Management (Develop or Buy)
+
M M M M M IoT Cloud Services
+
IoT Vertical
Applications
Device or
Controller Edge Node Fog Node Data Center Cloud
Generating Data Capturing Data Aggregating Data Leveraging Data Analyzing Data
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
Leveraging Data End to End with Cisco
Visualization Analytics Alerting
Cloud APIs
E2E Management
Policy Based Data Transformation, Event Processing and Routing
E2E Security
DCM Module
Cloud Management of Gateway & Devices
High Performance Data Anomaly
Third Party Applications
Data Storage Transformation Detection
Management EFM Module
Modbus | OPC | MTC 1.4 | MTC 1.3 | Other
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
Walk through
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Where do I begin?
• Create a DevNet account
• Read this Cisco Kinetic Getting Started page – [Link]
• Visit - [Link]
• User Guide - [Link]
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
Gateway Management
• Swagger Style APIs
• Integrate with existing Management Tools
• Build Custom Interfaces
• API Docs
• [Link]
• [Link]
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
Edge & Fog App Development
• Intelligence at Edge
• Take action based on data
• Real time response
• Protocol Support
• Interface with various sensors / machines
• Analytics
• Run efficient ML algorithms
• Visualization
• Provide Vertical Specific Dashboards
• IOX Developer Support - [Link]
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
IOX App – package_config.ini
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Cisco Kinetic Developer Support for Edge
• [Link]
• Intelligence at Edge
• DSL – State Processing at Edge
• Data Inspection & Decision Making
• Thresholds / Slice / Throttle / Time Series Data Operations
• Supports Data Reduction
• Data Delivery Policies in the Cloud
• Rules Engine at Edge – Java JAR File
• Sample App - [Link]
• Works with RaspberryPi + SenseHat
• Easily adaptable
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
Cisco Kinetic MQTT Client APIs
/*Client object instantiation*/
ICloudConnectClient dcClient = new MQTTClientEdge();
/*
Initialize the client with Properties and MqttCallbackExtended.
props - Properties object which reads the package_config.ini to populate mqtt credentials.
callback - MqttCallbackExtended object to decide necessary action required on messageArrival, connectComplete, onDelivery etc.*/
[Link](props, callback);
/*The connect API establishes the mqtt connection from the sample app to IoT Data Connect Cloud. */
[Link]();
/*The publish API publishes 'msg' on 'topic' for mqtt broker in IoT DataConnect Cloud */
[Link](topic(), msg);
/*The subscribe API subscribes to 'topicToSubscribe' for mqtt broker in IoT DataConnect Cloud */
[Link](topicToSubscribe);
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
Cisco Kinetic Rules Engine
• Example Rules at Edge using Cisco Kinetic Rule Engine
• Threshold
when<Rule1> [Link] in-msg THEN {
when<Rule1a> msg([Link]) > 5 then {
LOG "Brake temp greater than 5" ;
}
}
• Slice Data – Do this in the Portal to drive Data Policies
SEND TO ”BluemixApp" TOPIC ”onlytemp" JSON [Link];
• Throttling
when abs(msg([Link]) - prev([Link])) > 10 THEN THROTTLE(1 m) {
SEND TO "starlord" TOPIC "EMAIL/TEMP_CHANGED_10" JSON engine;
}
• Time Series
TS_UPDATE tempTimeSeries WITH msg([Link]) WINDOW (3 sec);
temp_avg = ts_avg(tempTimeSeries);
temp_count = ts_count(tempTimeSeries);
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
Cisco Kinetic Rules Engine APIs
/*Instantiate the rule engine object*/
RuleEngine ruleProcessor = new RuleEngine(configFile);
/*Pass each message through ProcessData method in rule engine to get a list of actions
generated after applying the rule on the message
deviceName - Name of the device as defined in the IoT DataConnect portal.
message - json string for the message received from Raspberry Pi or read from the file.*/
List<REMessage> messages = [Link](deviceName, message);
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
Cloud Applications
• Vertical Specific Applications
• Predictive Maintenance – Analytics / Machine Learning
• Remote Expert – Build on Remote Access Feature
• Visualization
• Uses Aggregated Data from the sensors
• Custom Dashboards – Fleet Mgmt / Robot Maintenance Support
• Admin & Management Apps
• Integrate with Workflow
• Uses Portal APIs
• Gateway / Device Deployment App
• Alert / Notification Apps
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
Cisco Kinetic – DCM Module
• Data Consumer / Command Publisher
• Visit - [Link]
• Sample AMQP client to consume data
• Extend to pull data into your Applications
• Sample AMQP client to send commands to Devices
• Extend to send commands from your Applications
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Summary
• Integrate with GMM APIs – Custom Dashboard
• Build Edge Intelligence – EFM
• Move Data to Applications - DCM
• Stability, Reliability, Manageability – Cisco Kinetic
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session
How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space
[Link]/ciscolivebot#DEVNET-1068
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Please complete your Online Complete Your Online
Session Evaluations after each
session
Session Evaluation
• Complete 4 Session Evaluations
& the Overall Conference
Evaluation (available from
Thursday) to receive your Cisco
Live T-shirt
• All surveys can be completed via
the Cisco Live Mobile App or the
Communication Stations
Don’t forget: Cisco Live sessions will be available
for viewing on-demand after the event at
[Link]/global/on-demand-library/.
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Tech Circle
• Meet the Engineer 1:1 meetings
• Related sessions:
• DEVNET-2598 DevNet Workshop-Deep Dive into Cisco IoT Operations Platform
• DEVNET-2093 An Introduction to Cisco IoT Operations Platform
• DEVNET-2404 DevNet Workshop- Deep Dive into Cisco IoT Operations Platform
• DEVNET-1777- An Introduction to the IoT Ecosystem-Casey Bleeker is the speaker
DEVNET-1068 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
Thank you