You are on page 1of 39

Hackathon Azure IoT

Bogot, Marzo 18 y 19 de 2017

Trainning in Azure IoT

Julian Suarez http://hackiot.azurewebsites.net


Julian.Suarez@Microsoft.com
Hyper-Scale Azure Footprint

38
Announced Azure
regions world wide
Hyper-Scale Capacity
3.5 Trillion Messages / Week

12
Azure IoT regions world wide

AZURE REGIONS AZURE IOT REGIONS


Secure Fast Open Scalable
End-to-end Start in minutes Connect anything Grow effortlessly

From the endpoint, through the Millions of devices, terabytes of


connection, to data, applications, Preconfigured solutions for the Any device, OS, data source, data, on-premises, in the cloud, in
and the cloud most common IoT scenarios software, or service the most regions worldwide

Things Insights Action


From endpoint to insight to action, across the enterprise, and around the world

Magic Quadrant Leader, Business Intelligence and Analytics Platforms

Built on the industrys leading cloud


BUILD YOUR IOT SOLUTIONS TODAY
Bi-directional
device-cloud
Telemetry Cold Path Analytics
ingestion Azure HDInsight, AzureML
Power BI
Command &
RTOS, Linux, Windows, Android, iOS

Azure Data Lake, Data Lake Analytics


Protocol Control
Adaptation Device Registry
& Identity
Device Mgmt
Devices

HTTP, AMQP, Hot Path Analytics App Web Mobile


MQTT Service Apps Apps
Azure Stream Analytics
Field Protocol Azure HDInsight Storm
Gateway Adaptation

Hot Path Business Logic


Cloud Gateway Service Fabric &
Field Logic Notification BizTalk
Gateway IoT Hub Actor Framework Apps Hubs Services

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity
Overview Azure IoT Suite capabilities
Device Connectivity & Management

Gateway Edge intelligence

Data Ingestion and Command & Control

Stream Processing & Predictive Analytics

Workflow Automation and Integration

Dashboards and Visualization

Preconfigured Solutions
Remote Monitoring

Predictive Maintenance
Preconfigured Solutions Remote Predictive
Monitoring Maintenance

More to come
PreConfigured Solutions
Remote Monitoring and Predictive Maintenance

Get started in minutes Fine-tuned to specific assets and processes

Modify existing rules and alerts Highly visual for your real-time operational data

Add your devices and begin tailor to your needs Integrate with back-end systems
PCS: Remote Monitoring azureiotsuite.com
PCS: Predictive Maintenance azureiotsuite.com
What is behind IoT Suite preconfigured solutions
Azure IoT Suite Remote Monitoring and Predictive Maintenance*
Devices
Azure IoT SDK (OSS) Power BI
Linux, RTOS,
mBed, Windows,
Android, iOS Web/
Mobile App

Storage blobs DocumentDB


Back end
systems and
processes
C# simulator IoT Hub Stream Event Hub Web Jobs Logic Apps
Analytics

* Azure ML
Microsoft Azure IoT Services
Producers Data Transport Storage Analysis Presentation & action

IoTHub SQL Database Machine Learning Azure Websites

Heterogeneous Table/Blob
HD Insight/Storm Mobile Services
client agents Storage

External Data
Sources { } DocumentDB Stream Analytics Notification Hubs

External Data
Cloud Services Power BI
Sources

External Services
Connect & Control
Azure IoT Hub
Azure IoT Hub
Designed for IoT to multi-scale Operations Monitoring
Connect, monitor and manage millions of devices Monitor device connectivity and device identity
management events
Security
Individual device identities and credentials Connection multiplexing
Per-device security tokens Single device-cloud connection for all communications
X.509 via AMQPS/HTTPS/MQTTS (C2D, D2C)
IP Filter to reject/accept specific IP addresses
Multi-protocol
Cloud-scale messaging Natively supports AMQP, HTTP, MQTT
D2C, C2D, File transfer & Request/Reply methods AMQP/MQTT over WebSocket
Durable messages Designed for extensibility to custom protocols
Device management: twin/methods/query/jobs
Declarative message routing Multi-platform
Cloud-facing feedback Device SDKs available for multiple platforms (e.g. RTOS,
Linux, Windows, iOS, Android)
Delivery receipts, expired messages
Multi-platform Service SDK
Device communication errors
D2C send
IoT Hub D2C receive
endpoint endpoint
Event processing
C2D receive C2D
(hot and cold path)
endpoint send endpoint,
receive delivery ack
Twin Device provisioning
endpoint Device identity and authorization
management
Methods
endpoint
Receive file
Device File upload notification
endpoint

Device Twins
Device id
endpoint

Direct Methods
Device
endpoint

Device management, device business logic,


Job
Device Connectivity monitoring
Field GW / management
Cloud GW
IoT Hub Create and delete IoT hubs, and update IoT
management hub properties, export device identities
D2C scenario recommendations
D2C message Twins Reported Properties File Upload

Synchronizing long-running
workflows, such as
Scenario Telemetry and alerts Large media files.
configuration and software
updates.

Maximum file size


Maximum reported properties
Size Up to 256KB messages supported by Azure
size is 8KB.
Blob Storage.

Frequency High Medium Low


C2D scenario recommendations
Direct methods Twins Desired Properties C2D messages

Commands that require One-way notifications


Scenario Long-running commands
immediate confirmation to the device

8KB requests / 8KB


Size Maximum 8KB 64KB
responses.

Frequency High Medium Low


Kafka Connect IoT Kafka
Hub

Cassandra
IoTHub2Cassandra
IoT Hub
Spark
IoTHubReact
(OSS Connectors)

New OS
Services

https://github.com/Azure/toketi-kafka-connect-iothub
https://github.com/azure/toketi-iothubreact
Devices and Gateway
SDK
Azure IoT Devices Catalog
https://catalog.azureiotsuite.com/

Microsoft Confidential, For Internal Use Only


SDK Library
SDK, agent libraries Open source framework
Easily accessible libraries in GitHub Develop custom agents for your devices

Cross platform support Secure communication


Choose real time OS, platform and language Simple and secure D2C and C2D connectivity
for messaging, device management and
Device support command and control
IP and access control capabilities
OS support
Connect IP, and non-IP devices RTOS, Linux, Windows, Android, iOS etc.
Support for direct connection devices and
resource strained or non-IP devices via Dev tool support & samples
gateway and field protocols IoTHub-explorer, Device Explorer, iothub-
diagnostics
Package & Libraries support
Nuget, Apt-Get, Npm, Maven, PyPi, Mbed lib, etc
Client OS/Runtime Version Protocols Packages
C device client Debian Linux 7.5HTTPS, AMQP, MQTT, AMQP over None
WebSockets
Fedora Linux 20HTTPS, AMQP, MQTT, AMQP over None
WebSockets
mbed OS 2HTTPS, AMQP, MQTT https://developer.mbed.org/users/AzureIoTClient/
TI-RTOS 2.xHTTPS None
Ubuntu Linux 14.04HTTPS, AMQP, MQTT, AMQP over https://launchpad.net/~aziotsdklinux/+archive/ubuntu/ppa-azureiot
WebSockets
Windows desktop 10HTTPS, AMQP, MQTT, AMQP over https://www.nuget.org/packages/Microsoft.Azure.IoTHub.IoTHubClient/
WebSockets
Yocto Linux 2.1HTTPS, AMQP None
Arduino (MKR1000, Zero, ESP8266, IDE 1.6.8HTTPS https://github.com/arduino-libraries/AzureIoTHub
Feather M0)
Node.js Device client Node.js 0.10+HTTPS, AMQP, MQTT, AMQP over https://www.npmjs.com/package/azure-iot-device
WebSockets
Node.js Service client Node.js 0.10+N/A https://www.npmjs.com/package/azure-iothub
Java Device client Java SE (Windows) 1.7HTTPS, AMQP, MQTT http://mvnrepository.com/artifact/com.microsoft.azure.iothub-java-
client/iothub-java-device-client
Java SE (Linux) 1.7HTTPS, AMQP, MQTT http://mvnrepository.com/artifact/com.microsoft.azure.iothub-java-
client/iothub-java-device-client
Android API 15HTTPS, MQTT
Java Service client Java SE 1.8N/A http://mvnrepository.com/artifact/com.microsoft.azure.iothub-java-
client/iothub-java-service-client
C# Device client .Net 4.5HTTPS, AMQP, MQTT, AMQP over https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/
WebSockets
UWP HTTPS https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/

PCL (Xamarin, Mono, UWP, WP8.1, HTTPS, AMQP, MQTT, AMQP over https://www.nuget.org/packages/Microsoft.Azure.Devices.Client.PCL/
Win8.1) WebSockets
C# Service client .Net 4.5N/A https://www.nuget.org/packages/Microsoft.Azure.Devices/
Python Device client Python 2.7.x, 3.4.x, 3.5.x HTTPS, AMQP, MQTT none
github.com/azure/iothub-diagnostics

Azure.com/iotdev
Azure IoT Gateway scenario and benefits
End user IoT gateway scenarios Benefits
Security and Isolation of Devices 1. SI & End user Reduced time to market
Bridge networks and isolate public Internet
Ensure cloud security and encryption and maintenance costs for gateway
Integration with any device solutions
Low resource devices
Device agents can be simplified 2. OEM - Increased margins on gateway
Connect new and legacy devices hardware compared to IoT Devices
Cloud Offload
Run logic on premises to reduce network and cloud 3. ISV - Monetize modules built on top of
consumption Azure IoT Gateway SDK
Low-latency / critical messages
Segregate message types
Edge processing
Enable time-sensitive decisions
Run edge analytics
Auditing - Central choke point to apply data policies
Optimize bandwidth and messages
Real Example Architecture
Bi-directional
device-cloud
Telemetry
ingestion
Command &
RTOS, Linux, Windows, Android, iOS

Control
Device Registry
& Identity
Device Mgmt
Devices

HTTP, AMQP,
MQTT

Field Azure Stream Analytics


Gateway Power BI

Cloud Gateway
IoT Hub

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity
Azure IoT Gateway SDK
Open Source
Cross platform: Windows or
Linux
Runs on many types of
hardware
Standards based (written in
ANSI C C99)
Easy to customize
Gateway concepts
Modules perform specific Scenario: Connect a legacy device
action (upload telemetry from a device that does not speak an internet ready
protocol)

Chain of modules - E2E


scenario

Messages information
published and received by
modules via broker
Azure IoT Gateway SDK Architecture
https://github.com/Azure/azure-iot-gateway-sdk/

On-prem gateway
Local file

HTTPS

MQTT

AMQP
IoT Hub
Protocol X Properties Properties

Telemetry
Content Content

BLE (Bluetooth Low Energy) Module BACNet


Logger Module OPC-UA
Identity Map Module Modbus
IoT Hub Module
Real Example Architecture
Bi-directional
device-cloud
Telemetry
ingestion
Command &
RTOS, Linux, Windows, Android, iOS

Control
Device Registry
& Identity
Device Mgmt
Devices

HTTP, AMQP,
MQTT

Field Azure Stream Analytics


Gateway Power BI

Cloud Gateway
IoT Hub

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity
Every event that flows through the system has a timestamp

SELECT FROM

SELECT FROM TIMESTAMP BY

Projecting timestamp into payload


SELECT System.Timestamp AS FROM
Tell me the count of tweets per time zone every 10 seconds
SELECT COUNT
FROM TIMESTAMP BY
GROUP BY TumblingWindow

Every 5 seconds give me the count of tweets and the average sentiment score over the last 10 seconds
SELECT COUNT(*) AS , AVG
FROM TIMESTAMP BY
GROUP BY HoppingWindow

Give me the count of tweets for all topics which are tweeted more than 10 times in the last 10 seconds
SELECT COUNT FROM
TIMESTAMP BY
GROUP BY SlidingWindow
HAVING COUNT
Real Example Architecture
Bi-directional
device-cloud
Telemetry
ingestion
Command &
RTOS, Linux, Windows, Android, iOS

Control
Device Registry
& Identity
Device Mgmt
Devices

HTTP, AMQP,
MQTT

Field Azure Stream Analytics


Gateway Power BI

Cloud Gateway
IoT Hub

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity
Real Example Architecture
Bi-directional
device-cloud
Telemetry
ingestion
Command &
RTOS, Linux, Windows, Android, iOS

Protocol Control
Adaptation Device Registry
& Identity
Device Mgmt
Devices

HTTP, AMQP,
MQTT

Field Protocol Azure Stream Analytics


Gateway Adaptation Power BI

Cloud Gateway
Field
Gateway IoT Hub

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity

You might also like