You are on page 1of 28

Spark the future.

May 4 – 8, 2015
Chicago, IL
BRK1552

The Microsoft Architecture


for the Internet of Things (IoT)
Kevin Miller, Principal Program Manager, Azure
IoT
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?
Depending on who you ask, IoT is either:

1 Nothing new
We’ve been
Command and control scenarios
doing this have much in common with some
for 40 years parts of IoT

2 A unicorn
But falling hardware costs, cloud
Magic, and will services and relatively ubiquitous
soon change
everything.
communications do enable new
approaches
IoT solutions until now
Most of the early successful IoT
deployments were either…
For very complex and expensive

# of solutions
devices, where the cost of a
custom hardware/software
solution is acceptable compared
to the cost of the device, or… Device complexity

For high-volume, homogeneous


devices, where the software needs
are relatively simple..
Emerging Challenges for IT
Scale
# devices >> # users, and growing fast
Volume of data (and network traffic)
Pace
Innovation pressure: analysis, command
and control, cost
Skill pressure: data science, new platforms
Environment
IT/OT collaboration
Security and privacy threats
Emerging standards
New competitors
IoT Device & Cloud Patterns

Batch Analytics & Visualizations


RTOS, Linux, Android, iOS, Windows

Azure HDInsight, AzureML, Power BI,


Azure Data Factory Presentation & Business
Connections
Devices

Hot Path Analytics


Websites, Mobile Services
Protocol Azure Stream Analytics, Azure Storm
Adaptation

Cloud Gateway
Field Hot Path Business Logic Dynamics, BizTalk Services,
Gateway Event Hub Service Fabric & Actor Framework Notification Hubs

Device Analytics & Presentation &


Connectivity & Management Operationalized Insights Business Connectivity
Microsoft Azure IoT services
Devices Device Connectivity Storage Analytics Presentation & Action

Machine
Event Hubs SQL Database App Service
Learning

Table/Blob Stream
Service Bus Power BI
Storage Analytics

External Data Notification


DocumentDB HDInsight
Sources { } Hubs

External Data
Data Factory Mobile Services
Sources

BizTalk Services
Pattern: Think big. Start small
Think big, but  Build to an architecture that will scale, but start
start small. prototyping with a small number of devices.
 It’s hard to predict what data provides value --
which impacts which sensors and devices are
Experiment,
necessary -- until you build something.
learn and
 The options can be overwhelming: set crisp
refine. 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.
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.
Pattern: Telemetry first
Start with telemetry.  It is very hard to predict in advance what
data will be useful.
 It is tempting, but likely inefficient to try for
The important data
business transformation in the first step.
may not be what you
 Think about not only device telemetry but
expected.
also diagnostic telemetry.
 Privacy and security implications of
Address privacy, telemetry are generally lesser than for
management and command and control.
security before
command & control.
Telemetry today
 High scale data ingestion via
Event Hub.
 High scale stream processing via
Event Hub
Stream
Analytics
Stream Analytics (or HDInsight
/Storm)
 Storage for cold-path analytics
 Processing for hot-path analytics

SQL Blob
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
Event Hub • 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
 Real-time analytics for Internet of Things solutions
Stream  Stream millions of events per second
Analytics  Mission critical reliability, performance and predictable results
 Rapid development with familiar SQL-based language
Demo Website Event Hub
Stream
Analytics

IoT Telemetry with Worker


(Node.js) SQL Blob
Event Hubs and Stream Analytics
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 UTCDateTime
FROM [eventhub]
INTO [out2blob]
Stream Analytics (to SQL)
SELECT
System.TimeStamp as UTCDateTime, device_id as Device_Id,
COUNT (*) as Count
FROM [iotdemoeventhub] TIMESTAMP BY EventProcessedUtcTime
INTO [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 UTCDateTime
FROM [iotdemoeventhub] TIMESTAMP BY EventProcessedUtcTime
Demo recap
Think about a scalable architecture, but start small,
and start with telemetry.

It is straightforward to
get a telemetry example
running with very limited
coding.
Pattern: Don’t interrupt the fast path
Don’t  In the telemetry
accidentally example, Event Hub
create data flows directly into Event Hub
Stream
Analytics
processing Stream Analytics.
bottlenecks. • Both components are designed for high scale.
• Don’t process between high-scale
“Don’t stick your components unless you can handle that scale.
head in the fire
hose unless you
know what
you’re doing.”
Pattern: Defense in depth
Think about The entire organization needs to be focused on security,
security, identity and that focus must inform the entire product lifecycle.
and manage- Requirements
Design &
Implementation
Verification
& Release
Response

ment from the


very beginning. Think about security on the device, at the field gateway
(if one exists) and in the cloud.
Security is a
Data Privacy
shared Physical
Security,
Hardware &
firmware
Network,
protocol &
Identity
management Protection and
responsibility Tamper
Detection
security,
secure boot
application
security
for devices
and users
Controls

between Azure
and the
Azure IoT Suite
 Accelerate time-to-value by easily deploying IoT applications
for the most common use cases, such as remote monitoring, asset
management, and predictive maintenance.

 Plan and budget appropriately through a simple, predictable


business model.
 Grow and extend solutions to support millions of assets
Azure IoT Reference Architecture
Devices and Data
Device and Event Processing Presentation
Data Sources Transport

Provisioning API Solution Portal


IP capable
devices
Agent Identity & Registry Stores
Libs Device State Store

Cloud Data
Existing IoT Gate- Stream Event Processor Visualization &
devices way Presentation
Agent
Gateway Analytics/
Libs
Storage Machine
Agent Learning
Libs
Low power
devices
Control System Worker Role
Pattern: Build to the reference architecture
Get started  The forthcoming IoT Suite will ease the design
now and and deployment of IoT applications for the
convert easily most common use cases.
when the IoT  Highly portable client libraries support easy
Suite is cloud connection for devices and gateways.
publically
available.  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.
Client Libraries

Demo 2 Website Event Hub


Stream
Analytics Power BI

Client Libraries
Worker
(Node.js) SQL Blob

Adding native clients and PowerBI


Summary
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
Call to Action
# Title
BRK2572 Create the Internet of Your Things: The Microsoft
Vision for IoT
BRK4553 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
Please evaluate this session
Your feedback is important to us!

Visit Myignite at http://myignite.microsoft.com


or download and use the Ignite Mobile App
with the QR code above.
© 2015 Microsoft Corporation. All rights reserved.

You might also like