Architecting IoT Solutions
with Microsoft Azure
Traffic Light
Alon Fliess:
Pets Vs Cattle
var sensorData = await _bmp180.GetSensorDataAsync(Bmp180.UltraHighResolution);
var messageString = JsonConvert.SerializeObject(sensorData);
var message = new
Microsoft.Azure.Devices.Client.Message(Encoding.ASCII.GetBytes(messageString));
await deviceClient.SendEventAsync(message);
Solution PortalProvisioning API
Identity & Registry Stores
Stream Event Processor
Analytics/
Machine
Learning
Data Visualization
& Presentation
Device State Store
Gateway/Edg
e Storage
IP capable
devices
Existing IoT
devices
Low power
devices
PresentationDevice and Event Processing
Data
Transport
Devices and
Data Sources
Azure
IoT Hub
Agent
Agent
Agent
Azure Time
Series Insights
Azure Machine
Learning
Azure Stream
Analytics
Cosmos DB Azure Data Lake
Azure Data Lake
Analytics
Azure HD
Insight
Azure Event
Hubs
Microsoft Flow
Azure Logic
Apps
Notification
Hubs
Azure Websites
Microsoft Power
BI
Azure Active
Directory
Azure IoT Hub
Azure IoT Hub
Device
Provisioning
Service
Azure IoT Edge
Azure Monitor
PaaSServices&
DeviceSupport
Edge SupportDevice Support
Azure IoT
Device SDK
Certified
Devices
Azure Certified
for IoT
Security
Program for
Azure IoT
IoT Services Data & Analytics Services Visualization & Integration Services
PaaSSaaS Microsoft IoT Central
IoT SaaS
Remote Monitoring Predictive Maintenance Connected factory
Windows 10
IoT Core
Azure IoT solution accelerators
SolutionsServices
 SaaS – Microsoft IoT Central
 PaaS – Azure IoT Suite
IoT HubIoT HubIoT Hub Receive device-to-cloud messages
Send cloud-to-device messages
Receive delivery acks
Receive file notifications
Direct method invocation
Receive operations monitoring
events
Device identity management
Device twin management
Job Management
Send device-to-cloud
messages
Receive cloud-to-
device messages
Initiates file
uploads
Retrieve and update
twin properties
Receive direct method
requests
Service
Per-Device
https://portal.azure.com
https://azure.microsoft.com/en-
us/resources/templates/
https://github.com/Azure/azure-cli
https://docs.microsoft.com/en-
us/powershell/azureps-cmdlets-docs/
IoT Hub
IoT Hub
management
SDKs
Device SDK
MQTT Protocol
Service SDK
Azure Provisioning SDKs
IoT Hub REST API
Azure IoT Edge runtime
Protocol Port
MQTT 8883
MQTT over WebSockets 443
AMQP 5671
AMQP over WebSockets 443
HTTP 443
IoT Hub
Device identity
management
Device provisioning and
authorization
Azure Portal
Development tools
Azure CLI
VSCode extension
Using a client SDK
.Net
Node
Java
Python
Device id
{
"id":"c303c82b-9144-4a3e-bddb-b893242a34ba",
"eTag":"MA==",
"status":"enabled",
"authentication":
{
"symmetricKey":{ "primaryKey":"oS2OoIkjsBbje…",
"secondaryKey":"27+ZeDZcaLs…“
},
"x509Thumbprint": {
"primaryThumbprint":null,
"secondaryThumbprint":null
},
"type":"sas“
}}
IoT Hub
Device identity
management
Device provisioning
and authorization
Device Provisioning Service
DPS
IoT Hub
Device id
Device
Device Twin
Tags
Properties
Desired
Reported
Device Code Back End Code
Read,
Receive change
notifications
Read, Write
Read,
Write change
notifications
Read,
Write change
notifications
Read change
notifications
IoT Hub
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Device
Twin
Jobs
Schedule and Broadcast
Device Twin Changes
Set Desired Properties,
Tags, Call Methods
Queries
Query Across
Device Twin State
For Business Logic,
Reporting and
Compliance
Learn more: https://aka.ms/azureiotgetstarted
IoT Hub
Device
Routing rules (query)
Body
{
"Weather":{
"Temperature":50,
"Time":"01:23:12Z"
}
}
SELECT * FROM Devices
WHERE tags.location = "bldg43"
my-message-type = "alert"
D2C receive
endpoint
Event processing
(hot path)
Event processing (hot and cold path)
Service Bus Topics
Service Bus Queues
Event Hub
Storage Blob
Custom endpoints
connectors
Header:
$content-encoding="utf-8"
$content-type =
"application/json"
my-message-type = "alert"
$body.Weather.Temperature > 75
Event Grid
IoT Hub + Routing to ServiceBus Queue + Stream Analytics + Azure Function + PowerBI + Stream I
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-ha-dr
Functionality RPO
Service availability for registry and communication
operations
Possible CName loss
Identity data in identity registry 0-5 mins data loss
Device-to-cloud messages All unread messages are lost
Operations monitoring messages All unread messages are lost
Cloud-to-device messages 0-5 mins data loss
Cloud-to-device feedback queue All unread messages are lost
Device twin data 0-5 mins data loss
Parent and device jobs 0-5 mins data loss
Monitoring & Alerting
Integrated with Azure Monitor
The smart cloud & Intelligent Edge
Cloud
IoT
Edge
AI
IoT in the Cloud IoT on the Edge
 Secure
 Cloud Managed
 Cross-Platform
 Portable
 Extensible
Simple processing
filtering, batching, compression
Complex processing
Azure Stream Analytics,
Cognitive Services
Azure IoT Edge IoT Hub
Devices
Local Storage
Custom IoT
Gateway
(Container)
Functions
RuntimeContainer
Management
Device
Twin
Device
Twin
Azure Stream
Analytics
(Container)
Azure Functions
(Container)
Cognitive Services
(Container)
Azure Machine
Learning
(Container)
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Module
Twin
Azure Sphere Device
MediaTek
Azure Digital Twins
FEATURE BASIC STANDARD
Device-to-cloud telemetry ✔ ✔
Per-device identity ✔ ✔
Message Routing, Event Grid
Integration
✔ ✔
HTTP, AMQP, MQTT Protocols ✔ ✔
DPS Support ✔ ✔
Monitoring and diagnostics ✔
Cloud-to-device messaging ✔
Device Management, Device Twin ✔
IoT Edge ✔
BASIC TIER PRICE PER UNIT
(PER MONTH)
TOTAL NUMBER OF
MESSAGES/DAY PER
UNIT
MESSAGE
METER
SIZE
MAX # OF
UNITS
B1 $10 400,000 4 KB 200
B2 $50 6,000,000 4 KB 200
B3 $500 300,000,000 4 KB 10
STANDARD TIER PRICE PER UNIT
(PER MONTH)
TOTAL NUMBER OF
MESSAGES/DAY PER
UNIT
MESSAGE
METER
SIZE
MAX # OF
UNITS
FREE FREE 8,000 0.5 KB 1
S1 $25 400,000 4 KB 200
S2 $250 6,000,000 4 KB 200
S3 $2,500 300,000,000 4 KB 10
Operation throttles & Other Limits:
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-quotas-throttling
TIER SUSTAINED THROUGHPUT SUSTAINED SEND RATE
B1, S1
Up to 1111 KB/minute per unit
(1.5 GB/day/unit)
Average of 278 messages/minute per unit
(400,000 messages/day per unit)
B2, S2
Up to 16 MB/minute per unit
(22.8 GB/day/unit)
Average of 4,167 messages/minute per unit
(6 million messages/day per unit)
B3, S3
Up to 814 MB/minute per unit
(1144.4 GB/day/unit)
Average of 208,333 messages/minute per unit
(300 million messages/day per unit)
https://github.com/alonf/BasicGateController
https://youtu.be/vq5AeLlsWx4
Introduction to the Internet of Things – From the Device to Microsoft Azure Cloud
https://blogs.msdn.microsoft.com/microsoft_press/2015/04/27/from-the-mvps-introduction-to-the-internet-of-things-
from-the-device-to-microsoft-azure-cloud/
Efficient IoT With Azure
https://blogs.msdn.microsoft.com/mvpawardprogram/2016/11/15/efficient-iot-with-azure/
Secure Provisioning of IoT device using Azure IoT Hub device SDK
https://blogs.msdn.microsoft.com/mvpawardprogram/2017/03/14/provisioning-of-iot-device/
http://www.thingiverse.com/thing:2253418
IoT SDKs https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks
GitHub https://github.com/Azure/azure-iot-sdks
Azure IoT Accelerators https://azure.microsoft.com/en-us/features/iot-accelerators/
Azure IoT Hub https://azure.microsoft.com/en-us/services/iot-hub/
Architecting io t solutions with microisoft azure ignite tour version

Architecting io t solutions with microisoft azure ignite tour version

  • 2.
  • 3.
  • 5.
  • 7.
  • 8.
    var sensorData =await _bmp180.GetSensorDataAsync(Bmp180.UltraHighResolution); var messageString = JsonConvert.SerializeObject(sensorData); var message = new Microsoft.Azure.Devices.Client.Message(Encoding.ASCII.GetBytes(messageString)); await deviceClient.SendEventAsync(message);
  • 11.
    Solution PortalProvisioning API Identity& Registry Stores Stream Event Processor Analytics/ Machine Learning Data Visualization & Presentation Device State Store Gateway/Edg e Storage IP capable devices Existing IoT devices Low power devices PresentationDevice and Event Processing Data Transport Devices and Data Sources Azure IoT Hub Agent Agent Agent
  • 12.
    Azure Time Series Insights AzureMachine Learning Azure Stream Analytics Cosmos DB Azure Data Lake Azure Data Lake Analytics Azure HD Insight Azure Event Hubs Microsoft Flow Azure Logic Apps Notification Hubs Azure Websites Microsoft Power BI Azure Active Directory Azure IoT Hub Azure IoT Hub Device Provisioning Service Azure IoT Edge Azure Monitor PaaSServices& DeviceSupport Edge SupportDevice Support Azure IoT Device SDK Certified Devices Azure Certified for IoT Security Program for Azure IoT IoT Services Data & Analytics Services Visualization & Integration Services PaaSSaaS Microsoft IoT Central IoT SaaS Remote Monitoring Predictive Maintenance Connected factory Windows 10 IoT Core Azure IoT solution accelerators SolutionsServices
  • 13.
     SaaS –Microsoft IoT Central  PaaS – Azure IoT Suite
  • 20.
    IoT HubIoT HubIoTHub Receive device-to-cloud messages Send cloud-to-device messages Receive delivery acks Receive file notifications Direct method invocation Receive operations monitoring events Device identity management Device twin management Job Management Send device-to-cloud messages Receive cloud-to- device messages Initiates file uploads Retrieve and update twin properties Receive direct method requests Service Per-Device
  • 21.
  • 22.
    SDKs Device SDK MQTT Protocol ServiceSDK Azure Provisioning SDKs IoT Hub REST API Azure IoT Edge runtime
  • 24.
    Protocol Port MQTT 8883 MQTTover WebSockets 443 AMQP 5671 AMQP over WebSockets 443 HTTP 443
  • 25.
    IoT Hub Device identity management Deviceprovisioning and authorization Azure Portal Development tools Azure CLI VSCode extension Using a client SDK .Net Node Java Python Device id { "id":"c303c82b-9144-4a3e-bddb-b893242a34ba", "eTag":"MA==", "status":"enabled", "authentication": { "symmetricKey":{ "primaryKey":"oS2OoIkjsBbje…", "secondaryKey":"27+ZeDZcaLs…“ }, "x509Thumbprint": { "primaryThumbprint":null, "secondaryThumbprint":null }, "type":"sas“ }}
  • 26.
    IoT Hub Device identity management Deviceprovisioning and authorization
  • 27.
  • 28.
    Device Twin Tags Properties Desired Reported Device CodeBack End Code Read, Receive change notifications Read, Write Read, Write change notifications Read, Write change notifications Read change notifications
  • 29.
  • 30.
  • 32.
    IoT Hub Device Routing rules(query) Body { "Weather":{ "Temperature":50, "Time":"01:23:12Z" } } SELECT * FROM Devices WHERE tags.location = "bldg43" my-message-type = "alert" D2C receive endpoint Event processing (hot path) Event processing (hot and cold path) Service Bus Topics Service Bus Queues Event Hub Storage Blob Custom endpoints connectors Header: $content-encoding="utf-8" $content-type = "application/json" my-message-type = "alert" $body.Weather.Temperature > 75 Event Grid
  • 34.
    IoT Hub +Routing to ServiceBus Queue + Stream Analytics + Azure Function + PowerBI + Stream I
  • 35.
    https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-ha-dr Functionality RPO Service availabilityfor registry and communication operations Possible CName loss Identity data in identity registry 0-5 mins data loss Device-to-cloud messages All unread messages are lost Operations monitoring messages All unread messages are lost Cloud-to-device messages 0-5 mins data loss Cloud-to-device feedback queue All unread messages are lost Device twin data 0-5 mins data loss Parent and device jobs 0-5 mins data loss
  • 36.
  • 37.
    The smart cloud& Intelligent Edge Cloud IoT Edge AI
  • 38.
    IoT in theCloud IoT on the Edge
  • 39.
     Secure  CloudManaged  Cross-Platform  Portable  Extensible Simple processing filtering, batching, compression Complex processing Azure Stream Analytics, Cognitive Services
  • 40.
    Azure IoT EdgeIoT Hub Devices Local Storage Custom IoT Gateway (Container) Functions RuntimeContainer Management Device Twin Device Twin Azure Stream Analytics (Container) Azure Functions (Container) Cognitive Services (Container) Azure Machine Learning (Container) Module Twin Module Twin Module Twin Module Twin Module Twin Module Twin Module Twin Module Twin Module Twin Module Twin
  • 48.
  • 49.
  • 50.
    FEATURE BASIC STANDARD Device-to-cloudtelemetry ✔ ✔ Per-device identity ✔ ✔ Message Routing, Event Grid Integration ✔ ✔ HTTP, AMQP, MQTT Protocols ✔ ✔ DPS Support ✔ ✔ Monitoring and diagnostics ✔ Cloud-to-device messaging ✔ Device Management, Device Twin ✔ IoT Edge ✔
  • 51.
    BASIC TIER PRICEPER UNIT (PER MONTH) TOTAL NUMBER OF MESSAGES/DAY PER UNIT MESSAGE METER SIZE MAX # OF UNITS B1 $10 400,000 4 KB 200 B2 $50 6,000,000 4 KB 200 B3 $500 300,000,000 4 KB 10 STANDARD TIER PRICE PER UNIT (PER MONTH) TOTAL NUMBER OF MESSAGES/DAY PER UNIT MESSAGE METER SIZE MAX # OF UNITS FREE FREE 8,000 0.5 KB 1 S1 $25 400,000 4 KB 200 S2 $250 6,000,000 4 KB 200 S3 $2,500 300,000,000 4 KB 10 Operation throttles & Other Limits: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-quotas-throttling
  • 52.
    TIER SUSTAINED THROUGHPUTSUSTAINED SEND RATE B1, S1 Up to 1111 KB/minute per unit (1.5 GB/day/unit) Average of 278 messages/minute per unit (400,000 messages/day per unit) B2, S2 Up to 16 MB/minute per unit (22.8 GB/day/unit) Average of 4,167 messages/minute per unit (6 million messages/day per unit) B3, S3 Up to 814 MB/minute per unit (1144.4 GB/day/unit) Average of 208,333 messages/minute per unit (300 million messages/day per unit)
  • 54.
    https://github.com/alonf/BasicGateController https://youtu.be/vq5AeLlsWx4 Introduction to theInternet of Things – From the Device to Microsoft Azure Cloud https://blogs.msdn.microsoft.com/microsoft_press/2015/04/27/from-the-mvps-introduction-to-the-internet-of-things- from-the-device-to-microsoft-azure-cloud/ Efficient IoT With Azure https://blogs.msdn.microsoft.com/mvpawardprogram/2016/11/15/efficient-iot-with-azure/ Secure Provisioning of IoT device using Azure IoT Hub device SDK https://blogs.msdn.microsoft.com/mvpawardprogram/2017/03/14/provisioning-of-iot-device/ http://www.thingiverse.com/thing:2253418 IoT SDKs https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks GitHub https://github.com/Azure/azure-iot-sdks Azure IoT Accelerators https://azure.microsoft.com/en-us/features/iot-accelerators/ Azure IoT Hub https://azure.microsoft.com/en-us/services/iot-hub/

Editor's Notes

  • #4 1868 On 9 December 1868,[7] the first non-electric gas-lit traffic lights were installed outside the Houses of Parliament in London its operational life was brief. It exploded on 2 January 1869 as a result of a leak in one of the gas lines underneath the pavement[12] and injured[2] the policeman who was operating it 1912 An electric traffic light was developed in 1912 by Laster Wire, a policeman in Salt Lake City, Utah who also used red-green lights 1914 Traffic Signal Company installed a traffic signal system on the corner of East 105th Street and Euclid Avenue in Cleveland, Ohio. It had two colours, red and green, and a buzzer, based on the design of James Hoge, to provide a warning for colour changes. The design by James Hoge[16] allowed police and fire stations to control the signals in case of emergency 1920: The first three colored light – Detroit (allowed four police officers to better control the intersection) הרמזור הראשון בישראל הותקן בעיר חיפה, בפינת הרחובות הרצל-בלפור, בשנת 1949 תקופת מהפכת התרבות בסין הוצע להחליף בין האור האדום לירוק, כך שהאור האדום ישמש לנסיעה, מכיוון שהצבע האדום היה צבעה של המהפכה והוא סימל, בעיני השלטון, את הקידמה. ראש ממשלת סין ג'ואו אנלאי הצליח למנוע שינוי זה, מחשש לפגיעה בבטיחות ולתאונות דרכים. 
  • #5 https://youtu.be/4CZc3erc_l4
  • #13 https://www.azureiotsolutions.com/Accelerators
  • #14 Highlight PaaS Microsoft has built a portfolio that supports the needs of all customers, and enables everyone to access the benefits of digital transformation. Microsoft IoT Central is a fully managed SaaS solution that is best used when you need to get started quickly with minimal IoT experience. If your business is pursuing speed over customization, SaaS models could be the perfect fit for your IoT implementation needs. Organizations with fewer device models, more predictable scenarios, and limited IoT/IT capabilities can now reap the benefits of IoT through a SaaS approach. Those businesses that previously lacked the time, money, and expertise to develop connected products can now get started quickly with Microsoft IoT Central. We are leading the industry in providing a mature SaaS solution that meets common IoT implementation pain points. Azure IoT Suite is a customizable PaaS solution that is best used when you need a lot of control over your IoT solution. If your business is implementing IoT for connected operations, or have very particular customization requirements for your connected products, you can have the control you need with Azure IoT Suite. Organizations with a large number of devices or device models, and manufacturers seeking connected factory solutions are examples of companies that can create highly customizable IoT solutions tailored to their complex needs. In addition, Azure IoT Edge provides organization with the capacity to do local processing. When combined with a PaaS or SaaS solution, edge processing can offer faster calculations and reduce the cost of data sent to the cloud. For the remainder of this presentation, we’ll focus on Microsoft IoT Central, and the unique value that it is bringing by democratizing IoT. <click>
  • #15 Connectivity Hub & Telemetry ingestion Connects a variety of devices to the cloud through an open platform Device management Enables understanding, control, and optimization of investments Analytics & dashboards Provide simple and consumable reports and visualizations for any platform Rules engine Real time data processing Time-series insights Identify trends among millions of IoT events Digital twin management Enables actionable insights through modeling and simulation User and identity management Delivers customized levels of permissions across users and protect from unauthorized access
  • #21 Microsoft Azure IoT Hub provides capabilities for securely connecting, provisioning, updating and sending commands to devices. IoT Hub enables companies to control millions of IoT assets running on a broad set of operating systems and protocols to jumpstart their Internet of Things projects. IoT Hub enables companies to: Establish reliable bi-directional communication with IoT assets, even if they are intermittently connected, so companies can analyze incoming telemetry data and send commands and notifications as needed. Enhance security of IoT solutions by leveraging per-device authentication to communicate with devices with the appropriate credentials. Revoke access rights to specific devices, if needed, to maintain the integrity of the system.
  • #28 The Device Provisioning Service works in a wide variety of scenarios: Zero-touch provisioning to a single IoT solution without requiring hardcoded IoT Hub connection information in the factory (initial setup). Automatically configuring devices based on solution-specific needs. Load balancing devices across multiple hubs. Connecting devices to their owner’s IoT solution based on sales transaction data (multitenancy). Connecting devices to a specific IoT solution depending on use-case (solution isolation). Connecting a device to the IoT hub with the nearest geo-location. Re-provisioning based on a change in the device, such as a change in ownership or location.
  • #30 To handle massive amount of devices and to communicate with offline devices, use Jobs: Jobs encapsulate the execution of device twin updates and direct methods against a set of devices at a schedule time The job is described as a JSON document Jobs are initiated by the cloud app and maintained by IoT Hub Once a job is initiated, querying for jobs enables the cloud app to refresh the status of running jobs More information
  • #41 Azure IoT Edge is: The evolution of the Azure IoT Gateway SDK A service that extends cloud capabilities to the edge and distributes intelligence across IoT devices Open-source and cross-platform support for building custom logic at the edgeAg Azure IoT Edge provides offline intelligent scenarios Analytics, Machine Learning Azure IoT Edge is under public preview and will be available later this year
  • #50 Spatial intelligence graph Digital twin object models Multiple and nested tenants Advanced compute capabilities Built-in access control
  • #54 Microsoft Azure IoT Hub provides capabilities for securely connecting, provisioning, updating and sending commands to devices. IoT Hub enables companies to control millions of IoT assets running on a broad set of operating systems and protocols to jumpstart their Internet of Things projects. IoT Hub enables companies to: Establish reliable bi-directional communication with IoT assets, even if they are intermittently connected, so companies can analyze incoming telemetry data and send commands and notifications as needed. Enhance security of IoT solutions by leveraging per-device authentication to communicate with devices with the appropriate credentials. Revoke access rights to specific devices, if needed, to maintain the integrity of the system.