5. Clash of Two Worlds
Machine Camp vs. Internet Camp
(aka. OT vs. IT)
Machine Camp
‣ Brown field
‣ Strong company heritage, risk aversion
‣ Corporate career is the norm
‣ Domain: Physics, engineering
‣Think big
‣ Waterfall approach
‣ Standards like DIN/ISO
‣ Long QA & release cycles (defect free)
‣ Long lead time
Internet Camp
‣ Green field
‣ High-risk, VC-driven culture
‣ Entrepreneurial management and employees
‣ Domains: IT, services
‣ Focus on point solutions/MVP
‣ Agile approach
‣ Open source
‣ Perpetual beta (“Fast patches”)
Reference: Enterprise IoT, 2nd
6. IIoT vs. CIoT
Courtesy of National Instruments
Categories IIoT IoT
Impact Evolutionary Revolutionary
Focus Data Things
Connectivity Structured Ad Hoc
Criticality
Mission
Critical
Important but
not critical
Standards
Existing
Devices &
Standards
New Devices
& Standards
Reference: Industrial Internet of Things: PROFINET Intro
Further reading: Compare IoT and IIoT: Find 11 Differences
7. Why Edge? (or Cloud-Centric Assumption)
• There is sufficient bandwidth to push data to the Cloud
• Connectivity is not an issue. A device will (almost) always be connected
to the cloud
• The latency induced by cloud-centralized analytics and control is
compatible with the dynamic of the IoT system
• The connectivity cost is negligible
• Industrial companies are comfortable in exposing their data to the cloud
Reference: Fog Computing with Vortex
8. Fog Computing vs. Edge Computing
Courtesy of Forest Giant
Data
processing
Data
processing
Data
processing
Data
processing
Data processing
10. Local Area Network
eNodeB
Mobile Core
MEC
ISP Backbone
ISP
Internet
eNodeB
Cloud, data centers,
app, services
Local Sensors/Actuators
4G, 5G
4G, 5G
Network Edge
Fog Node/IoT Edge Gateway
Customer Edge
MobileMulti-Access Edge Computing
Which edge are you talking about?
offload
17. AWS IoT Device Mgmt.
Device Provisioning Fleet Indexing and Search Device Jobs
Reference: AWS IoT Device Management
Onboard Organize Update Output
User can onboard a large
number of devices at once
using device provisioning
Organize devices into groups which
can also be arranged into hierarchies
AWS IoT Device Management sends
a device job over-the-air (OTA), such
as a firmware update
Firmware updates can be sent to a
group or individual devices
19. AWS IoT Core/SDK
Things
Applications
AWS IoT Core AWS
MQTT over TLS
MQTT over WebSocket/TLS
HTTP
Reference: Smart Home Building Blocks with Intel Edison & AWS
Device SDK
Certificate
Allows devices to seamlessly
drop on/off connection
Manages
device identity
Allows integration with
other AWS services (route)
Communicates with
authenticates &
authorized devices
Device
Gateway
Rules Engine
Thing
Shadow
Thing
Registry
MQTT
HTTP (REST)
Amazon
CloudWatch
Amazon
Kinesis
Amazon
ES
Amazon
DynamoDB
Amazon
S3
Amazon
Lambda
Amazon
SQS
Amazon
SNS
Amazon
Machine Learning
Actions
20. AWS IoT Rules Engine
SELECT DATA FROM TOPIC WHERE FILTER ACTIONS
Reference: (MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
{
"awsIotSqlVersion": "2016-03-23",
"sql": "SELECT * FROM 'iot/test'",
"ruleDisabled": false,
"actions": [
{
"s3": {
"roleArn": "arn:aws:iam::123456789012:role/aws_iot_s3",
"bucketName": "my-bucket",
"key": "myS3Key"
}
}
]
}
Rule
Name
Description
SQL Statement
Array of Actions
21. AWS IoT Thing Shadows
Thing Shadow Mobile App
AWS IoT
Intermittent
Connection
REST APIs
Reported
Desired
Delta
• Report current state to one or multiple shadows
• Retrieve its desired state from shadow
Shadow reports delta, desired and reported states
along with metadata and version
• Set the desired state of a device
• Get the last reported state of the device
• Delete the shadow
Reference: The Lifecycle of an AWS IoT Thing
22. Thing Shadow - Step0
Thermostat
Thing Shadow
Permissions
Cognito Identity
Thing Shadow
68 Reported State
Desired State
State Delta
*nest is trademark owned by Google LLC
68
Reference: AWS Thing Shadow
Authenticated
X.509 Certificate
68
Report
23. Thing Shadow - Step1
Thermostat
Thing Shadow
68 Reported State
Desired State
State Delta
*nest is trademark owned by Google LLC
68
70
Reference: AWS Thing Shadow
68
70
Update
24. Thing Shadow - Step2
Thermostat
Thing Shadow
68 Reported State
Desired State
State Delta
*nest is trademark owned by Google LLC
68
70
Reference: AWS Thing Shadow
68
70
Calculate
+2
Pub
Sub
25. Thing Shadow - Step3
Thermostat
Thing Shadow
68 Reported State
Desired State
State Delta
*nest is trademark owned by Google LLC
70
68
70
Reference: AWS Thing Shadow
70
70
1. React
2. Update
26. Thing Shadow - Step4
Thermostat
Thing Shadow
68 Reported State
Desired State
State Delta
*nest is trademark owned by Google LLC
70
68
70
Reference: AWS Thing Shadow
70
70
Sub
Pub
Confirm
31. Machine Learning Workflow
Training Data
Test Data
Machine Learning
Algorithms
Production
Data
Machine
Learning
Model
Prediction
Iterations
32. Training vs. Inference
Large N
Forward
Backward
“car”
?
Error
TRANING
Smaller,
varied N
Forward
“car”
INFERENCE
Reference: Discover the Difference Between Deep Learning Training and Inference
33. AWS Machine Learning
binary classification
(binary attributes)
multiclass classification
(categorical attributes)
Regression
(numeric attributes)
AWS ML Process
Prepare Data
(Transform)
Create a Training
DataSource
Create a ML
model
Review model &
Set a score
threshold
Use model to
generate
predictions
Blackbox
34. AWS SageMaker
Jupyter
Notebook
Algorithms Training Hosting
‣ Interactive Environment
‣ build-in algorithms
‣ pre-built train/inference images
‣ your own images
‣ Scalable CPU/GPU Cluster
‣ Inference code image
‣ Trained model
First Launch: 07’ Nov.
35. Training code
Amazon ECR
Amazon SageMaker
Client Application
Model Training (on EC2)
Reference: Amazon Web Services
Inference code
36. Training code
Helper code
Training code
Amazon ECR
Amazon SageMaker
Client Application
Model Training (on EC2)
Reference: Amazon Web Services
Training Data
Inference code
37. Inference code
Training code
Helper code
Training code
Amazon ECR
Amazon SageMaker
Client Application
Model Training (on EC2)
Reference: Amazon Web Services
Model artifacts
Training Data
38. Inference code
Training code
Helper code
Inference code
Helper code
Training code
Amazon ECR
Amazon SageMaker
Client Application
Model Hosting (on EC2)
Model Training (on EC2)
Reference: Amazon Web Services
Model artifacts
Training Data
39. Inference code
Training code
Helper code
Inference code
Helper code
Training code
Amazon ECR
Amazon SageMaker
Client Application
Inference Endpoint
Model Hosting (on EC2)
Model Training (on EC2)
Inference request
Inference response
Reference: Amazon Web Services
Model artifacts
Training Data
40. Inference code
Training code
Helper code
Inference code
Helper code
Training code
Amazon ECR
Amazon SageMaker
Client Application
Inference Endpoint
Model Hosting (on EC2)
Model Training (on EC2)
Inference request
Inference response
Reference: Amazon Web Services
Model artifacts
Training Data
Ground
Truth
43. Why Edge? (or Cloud-Centric Assumption)
• There is sufficient bandwidth to push data to the Cloud
• Connectivity is not an issue. A device will (almost) always be connected
to the cloud
• The latency induced by cloud-centralized analytics and control is
compatible with the dynamic of the IoT system
• The connectivity cost is negligible
• Industrial companies are comfortable in exposing their data to the cloud
Reference: Fog Computing with Vortex
44. AWS Greengrass Features
Connectivity Latency Data
Local Lambda
function
Local
Actions
Local Messaging
Local
Triggers
Local Device
Shadow
Data and
state sync
ML Inference
Local
Inference
Concerns
46. Local Inference
Training
Data
Test Data
Machine Learning
Algorithms
Machine
Learning
Model
Cloud Infrastructure
Edge Infrastructure
Serverless
function
Production
Data
Predictive Analytics
Inference
Training
Data
Test Data
Machine Learning
Algorithms
Machine
Learning
Model
Cloud Infrastructure
Edge Infrastructure
Production
Data
Machine
Learning
Model
Predictive Analytics
Deployment
Inference
Reference: How Edge Computing And Serverless Deliver Scalable Machine Learning Services
Local Inference
47. Greengrass ML inference Workflow
ML model
Prediction
Data
AWS Greengrass
Core Device
Device performs inference
locally to action quickly
AWS
Greengrass service
AWS
SageMaker
Bring your own
ML model
Device data
Transfer trained
ML model
Edge/Gateway Cloud
Result from
inference processing
Trained ML models
Transfer ML models to
Greengrass devices
Build and train ML models
in the cloud
Reference: Perform Machine Learning Inference
48. Local Triggers
Core
Service
GG
Core
Device Device
MQTT Broker
MQTT Client MQTT Client
Lambda functions
Core Subscriptions
Devices
Group Definition
Source Destination
Deploy
Lambda funcs.
Subscriptions
REST Request
Group Name
IP address of Core
Group's root CA Cert.
Service Discovery
50. Summary - simplified model
AWS IoT
Device SDK
AWS
GreenGrass
AWS IoT Core
API Gateway
MQTT broker
clusters
AWS Ecosystem
MQTT Client
MQTT Broker
OTA agent
Daemon
State Mgmt.
Function
Watchdog
MQTT Client
TLS Library
51. Discussions of Greengrass
‣ Price (3 Free Core / 1 Year)
‣ Linux only proprietary implementation (sandbox: Namespace + Cgroup)
‣ Lack of local service discovery (Device Node should connect to cloud
once!)
‣ Complicated and cumbersome procedures
‣ Good for Greenfield applications
53. Friendly Reminders
‣ Internet connection is not stable (in the context of IoT)
‣ Security is not easy
‣ Device Mgmt. is not easy: Partial OTA, reboot
‣ OTA is not easy: (Partition based, Package based, Version, OS, Die-Hard)
‣ OPC-UA is one of the OT protocols (esp. Greenfield)
‣ Certs & Keys deployment in volume manufacturing is not easy
‣ Windows is still matter (in the context of IoT)
Further reading: Top 10 Reasons People Aren't Embracing the IoT
56. Readings
‣ Taking the pulse of enterprise IoT - Mckinsey & Company, July 2017
‣ Top 10 Reasons People Aren't Embracing the IoT - IoTI, April 2016
‣ Compare IoT and IIoT: Find 11 Differences - RAMAX Group, Feb 2018
‣ Enterprise IoT, 2nd - Strategies and Best Practices for Connected
Products and Services - Dirk Slama et al., Nov 2015
‣ The Lifecycle of an AWS IoT Thing - AWS, Oct 2016
Comprehensive Marketing survey
Know your customers
Narrow Your Focus
Fundamentals for every IoT Practitioners
Comprehensive AWS IoT Core Introduction
58. Differences between MQTT broker
& AWS IoT Device Gateway
• No retained message support
• No QOS2 support
• No message persistence
Reference: Message Broker for AWS IoT > Protocol
59. AWS IoT Core
Port/Protocol/Authentication combinations
Protocol Authentication TCP Port
MQTT Client Certificate 8883, 443*
HTTP Client Certificate 8443
HTTP AWS Signature Version 4 443
MQTT over Websockets AWS Signature Version 4 443
Reference: AWS IoT Core Now Supports MQTT Connections with Certificate Based Client Authentication On Port 443
60. Nvidia’s updates EULA to ban the use of gamer-oriented
GPUs in data centers
Reference: Nvidia’s updates EULA to ban the use of gamer-oriented GPUs in data centers
Reference: Nvidia: Using cheap GeForce, Titan GPUs in servers? Haha, nope!
Courtesy of License For Customer Use of NVIDIA GeForce Software