park the future. May 4 – 8, 2015 Chicago, IL
Dec 19, 2015
The Microsoft Architecturefor the Internet of Things (IoT)Kevin Miller, Principal Program Manager, Azure IoT
BRK1552
Agenda
State of the art for IoT
Architecture for building today
Patterns and anti-patterns
Demo
Architecture for the future
Is IoT even a new thing?
Command and control scenarios have much in common with some parts of IoT
But falling hardware costs, cloud services and relatively ubiquitous communications do enable new approaches
Depending on who you ask, IoT is either:
Nothing new
A unicorn
1
2
Magic, and will soon change everything.
We’ve been doing this for 40 years
Most of the early successful IoT deployments were either…
For very complex and expensive devices, where the cost of a custom hardware/software solution is acceptable compared to the cost of the device, or…
For high-volume, homogeneous devices, where the software needs are relatively simple..
IoT solutions until now
Device complexity
# o
f so
luti
ons
Emerging Challenges for ITScale# devices >> # users, and growing fastVolume of data (and network traffic)
PaceInnovation pressure: analysis, command and control, costSkill pressure: data science, new platformsEnvironmentIT/OT collaborationSecurity and privacy threatsEmerging standardsNew competitors
Field Gateway
Device Connectivity & Management
Analytics & Operationalized Insights
Presentation & Business Connectivity
IoT Device & Cloud PatternsD
evi
ces
RTO
S, Li
nux,
Andro
id, iO
S, W
indow
s
Protocol Adaptation
Batch Analytics & Visualizations
Azure HDInsight, AzureML, Power BI,
Azure Data Factory
Hot Path Analytics
Azure Stream Analytics, Azure Storm
Presentation & Business Connections
Websites, Mobile Services
Dynamics, BizTalk Services, Notification Hubs
Hot Path Business Logic
Service Fabric & Actor Framework
Cloud Gateway
Event Hub
Microsoft Azure IoT services
Devices Device Connectivity Storage Analytics Presentation & Action
Event Hubs SQL Database Machine Learning App Service
Service Bus Table/Blob Storage
Stream Analytics Power BI
External Data Sources DocumentDB HDInsight Notification
Hubs
External Data Sources Data Factory Mobile
Services
BizTalk Services
{ }
Build to an architecture that will scale, but start prototyping with a small number of devices.
It’s hard to predict what data provides value -- which impacts which sensors and devices are necessary -- until you build something.
The options can be overwhelming: set crisp goals up front and use those to define and refine.
It’s much easier to work through device identity, management/update and security at small scale.
Pattern: Think big. Start small
Think big, but start small.
Experiment, learn and refine.
IoT architecture requirements Handle extreme hardware and software heterogeneity.Build for hyper-scale and enable low data latency.Be secure by design; support defense in depth.Lower barriers to entry: evaluate -> prototype -> deploy.Deliver telemetry and notifications that are meaningful even at extreme scale.Provide hot-path and cold-path analysis and action/response.
It is very hard to predict in advance what data will be useful.
It is tempting, but likely inefficient to try for business transformation in the first step.
Think about not only device telemetry but also diagnostic telemetry.
Privacy and security implications of telemetry are generally lesser than for command and control.
Pattern: Telemetry first
Start with telemetry.
The important data may not be what you expected.
Address privacy, management and security before command & control.
High scale data ingestion via Event Hub.
High scale stream processing via Stream Analytics (or HDInsight /Storm)
Storage for cold-path analytics
Processing for hot-path analytics
Telemetry today
Event HubStream Analytics
SQL Blob
Real-time analytics for Internet of Things solutions Stream millions of events per second Mission critical reliability, performance and predictable
results Rapid development with familiar SQL-based language
Event Hubs and Stream Analytics• Cloud-scale telemetry ingestion from websites, apps,
and devices• Compatible with more than a million publishers
supporting HTTP, AMQP and MQTT• Ingress millions of events per second • SAS based security, with unique token per publisher• Configurable data retention (1-30 days)• Low latency (<10 ms for volatile data)• Pluggable with other cloud services like Stream Analytics
Event Hub
Stream Analytics
Demo
IoT Telemetry withEvent Hubs and Stream Analytics
Event HubStream Analytics
SQL Blob
Website
Worker (Node.js)
JavaScript (to Event Hub)var eventBody = { "reading": x, "device_id": id };
ehClient = new EventHubClient({ 'name': "kevinmil-demo", 'namespace': "kevinmil-demo-ns", 'sasKey': <snipped>, 'sasKeyName': "sendTelemetry", 'timeOut': 10, }); var msg = new EventData(eventBody); ehClient.sendMessage(msg, function (messagingResult) {
// <body snipped>});
Stream Analytics (to blob)SELECT device_id as Device_Id, reading as Reading, EventProcessedUtcTime as UTCDateTimeFROM [eventhub]INTO [out2blob]
Stream Analytics (to SQL)SELECT System.TimeStamp as UTCDateTime, device_id as Device_Id, COUNT (*) as CountFROM [iotdemoeventhub] TIMESTAMP BY EventProcessedUtcTimeINTO [alertCounts]WHERE ( CAST(reading AS float) > 115.0 )GROUP BY device_id, SlidingWindow(second, 15)HAVING COUNT(*) > 1
SELECT device_id as Device_Id, reading as Reading, EventProcessedUtcTime as UTCDateTimeFROM [iotdemoeventhub] TIMESTAMP BY EventProcessedUtcTimeINTO [stream2sql]
Demo recapThink about a scalable architecture, but start small, and start with telemetry.
It is straightforward to get a telemetry examplerunning with very limitedcoding.
In the telemetry example, Event Hub data flows directly into Stream Analytics.
Pattern: Don’t interrupt the fast pathDon’t accidentally create processing bottlenecks.
“Don’t stick your head in the fire hose unless you know what you’re doing.”
• Both components are designed for high scale.
• Don’t process between high-scale components unless you can handle that scale.
Event HubStream Analytics
The entire organization needs to be focused on security, and that focus must inform the entire product lifecycle.
Pattern: Defense in depthThink about security, identity and manage-ment from the very beginning.
Security is a shared responsibility between Azure and the customer.
RequirementsDesign &
Implementation
Verification & Release Response
Think about security on the device, at the field gateway (if one exists) and in the cloud.
Physical Security, Tamper Detection
Hardware & firmware security, secure boot
Network, protocol & application security
Identity management for devices and users
Data Privacy Protection and Controls
Accelerate time-to-value by easily deploying IoT applications for the most common use cases, such as remote monitoring, asset management, and predictive maintenance.
Azure IoT Suite
Plan and budget appropriately through a simple, predictable business model.
Grow and extend solutions to support millions of assets
Azure IoT Reference Architecture
Solution PortalProvisioning API
Identity & Registry Stores
Stream Event Processor
Analytics/ Machine Learning
Data Visualization & Presentation
Device State Store
Gateway Storage
IP capable devices
Existing IoT devices
Low power devices
Presentation Device and Event ProcessingData Transport
Devices and Data Sources
Cloud Gate-way
AgentLibs
AgentLibs
Control System Worker Role
AgentLibs
The forthcoming IoT Suite will ease the design and deployment of IoT applications for the most common use cases.
Highly portable client libraries support easy cloud connection for devices and gateways.
IoT Hub will extend Event Hubs to include device provisioning, identity, command & control, and management.
Building to the reference architecture will simplify conversion to the IoT Suite.
Pattern: Build to the reference architectureGet started now and convert easily when the IoT Suite is publically available.
Power BIDemo 2
Adding native clients and PowerBI
Event HubWebsite
Worker (Node.js)
Client Libraries
Client Libraries
Stream Analytics
SQL Blob
Think big (architecture), but start small (experiment, learn and refine).
Start with telemetry. Address privacy, security and manageability before moving to command and control.
Don’t interrupt the fast path and create processing bottlenecks.
Think about security, identity and management from the very beginning, and through the life of the product.
Build to the reference architecture to ease the move to IoT Suite.
Summary
Call to Action
# TitleBRK2572 Create the Internet of Your Things: The
Microsoft Vision for IoTBRK4553 Azure IoT Security Fundamentals
BRK4554 Connecting Your Devices to the Azure IoT Suite
Case Study:Itron , Inc.: SDL Chronicles:
http://www.microsoft.com/en-us /download/details.aspx?id=29856
Visit Myignite at http://myignite.microsoft.com or download and use the Ignite Mobile App with the QR code above.
Please evaluate this sessionYour feedback is important to us!