microsoft e il mondo iot

42
Template designed by Microsoft e il mondo IoT Erica Barone Microsoft Technical Evangelist Windows & IoT @_ericabarone [email protected]

Upload: dotnetcampus

Post on 13-Aug-2015

88 views

Category:

Education


0 download

TRANSCRIPT

Page 1: MICROSOFT E IL MONDO IOT

Template designed by

Microsoft e il mondo IoT

Erica BaroneMicrosoft Technical Evangelist Windows & IoT @_ericabarone [email protected]

Page 2: MICROSOFT E IL MONDO IOT

Internet of things

Microsoft’s point of view: Internet of Your Things

End-to-end IoT scenario: from your sensor to Microsoft Azure

Agenda

Page 3: MICROSOFT E IL MONDO IOT

Simply: gain value from Your Things

Connectivity Data AnalyticsYour Things

IoT is not just about collecting data, it’s about how you can use these data to

gain “value”

Page 4: MICROSOFT E IL MONDO IOT

What kind of «value»?

Money Happy Customers

New Business Models

Page 5: MICROSOFT E IL MONDO IOT

IoT is an Inflection Point

Hardware is cheap

Connectivity is pervasive

Development is easy

New Innovative Scenarios

Huge benefits fuel demand

Page 6: MICROSOFT E IL MONDO IOT

IoT 2010

Cell phone

VoIP phone

HVAC

Computer

Vending

Printer

Security

Media player

Oven

Automobile

Smart scale

Refrigerator

Television

Microwave

Coffee maker

Alarm clock

HOME HOMEWORKPLACE

Page 7: MICROSOFT E IL MONDO IOT

IoT 2015

Sleep tracking

COMMUTE COMMUTE

Home security Home automation

Leak detection

Smart appliances

Indoor navigation

Health monitoring

Smart lighting

Pet tracking

Information capture

Trip tracking and car health

Control

Child and eldermonitoring

Sports and fitness

Air conditioning and temperature control Environmental

sensors

Behavior modification

Garden, lawn and plant care

Food and nutrition tracking

Beacons and proximity

New devices and sensors

Object tracking

Identity Smart vending machines

Medication adherence

Bike ride stats and protection

Entertainment systems

Office equipment

HOME HOMEWORKPLACE

Page 8: MICROSOFT E IL MONDO IOT

26 Billion of connected devices

2020 Forecast*

7.3 Billion of

tablets and PCs

InsuranceManufacturing

Healthcare

Vertical leading industries

Transportation

Utilities Agricolture

Other industries gaining value from IoT

*Source: Gartner http://www.gartner.com/newsroom/id/2636073

Page 9: MICROSOFT E IL MONDO IOT

IoT concrete scenarios

Page 10: MICROSOFT E IL MONDO IOT

Predicting future performance from historical data

Predictive Analytics

Recommendation engines

Advertising analysis

Weather forecasting for business planning

Social network analysis

IT infrastructure and web app optimization

Legal discovery and document archiving

Pricing analysisFraud detection

Churn analysis

Equipment monitoring

Location-based tracking and services

Personalized Insurance

Predictive analytics should address the likelihood of something happening in the future, even if it is just an instant later…

Page 11: MICROSOFT E IL MONDO IOT

Example

• Damage is reported by customer or during weekly restocking routes

• Technician must be scheduled to investigate

• Process take up to 8 days to fixa broken machine

• Sensor data is used to monitor cooler condition in real-time

• Broken coolers are identifiedat time of failure

• Lost sales remain due to maintenance lead teams(parts & repair technicians)

• Azure ML predicts where, when,& what failures will occur based on sensor data

• Spare parts & repairs can be scheduled before machines shut down leading to no lost sales

CURRENT SCENARIO REAL-TIME SENSORS SENSORS & MACHINE LEARNING

Days: Days:Days:

Page 12: MICROSOFT E IL MONDO IOT

Microsoft’s view: Internet of Your Things

Page 13: MICROSOFT E IL MONDO IOT

Microsoft’s view

The Internet of Things starts with your things

Build on the infrastructure you already have

Add more devices to the ones you already own

Get more from the data that already exists

Stop just running your business. Start making it thrive. Start realizing the potential of the Internet of Your Things.

Page 14: MICROSOFT E IL MONDO IOT

Microsoft IoT

IoT Editions Power a Broad Range of Devices

20 years of history in embedded devices

One Windows platform for all devices

Enterprise-ready, Maker-friendly

Designed for today’s IoT environments

Free IoT Core edition!

Cloud-Based IoT Services & Solutions

Easy to provision, use and manage

Pay as you go, scale as you need

Global reach, hyper scale

End-to-end security & privacy

Windows, Mbed, Linux, iOS, Android, RTOS support

Azure IoT

Page 15: MICROSOFT E IL MONDO IOT

Windows 10

Windows 10

Phone Small Tablet

2-in-1s(Tablet or Laptop)

Desktops & All-in-OnesPhablet Large Tablet

Classic Laptop

XboxIoT

Surface Hub

Holographic

Page 16: MICROSOFT E IL MONDO IOT

Windows 10 IoT Editions

For Industry DevicesWindows 10 Enterprise (IoT)

Desktop Shell, Win32 apps

1 GB RAM, 16 GB StorageFor Mobile DevicesWindows 10 Mobile Enterprise (IoT)

Modern Shell

Mobile Chassis requirement

512 MB RAM, 4 GB storageFor Small DevicesWindows 10 IoT Core

Dedicated devices

No Shell/Store/MS Apps

256MB RAM, 2GB storage

Universal Apps

Windows Device Services

• On all Windows IoT clients

• Extends value of Windows for OEMs

• OS telemetry, update management, interoperability

• Azure IoT-ready

Requires desktop or desktop apps– Win32, .NET, WPF, etc. ?

Requires a Shell experience, multiple applications, Windows first-party

applications, or mobile voice?

Otherwise

Page 17: MICROSOFT E IL MONDO IOT

Azure IoT services

Accelerate your business transformation

Microsoft Azure IoT Suite

Azure IoT Suite

Predictive MaintenanceRemote Monitoring Asset Management

And more…

Addressescommon scenarios:

Enables you to Mine data Take actionConnect assets

M o n i t o r i n g

Page 18: MICROSOFT E IL MONDO IOT

End to End Scenario: From your sensor to Microsoft Azure

Page 19: MICROSOFT E IL MONDO IOT

Connection and interconnection

Page 20: MICROSOFT E IL MONDO IOT

Telemetry system architecture

Sensor Device Gateway

Cloud10010 010011

Different technologies

Different protocols to send data to the cloud

USB

HTTP

Page 21: MICROSOFT E IL MONDO IOT

Legacy IOTMQTT/COAP/Custom

ApplicationsAMQP/HTTP, C, .NET,

Java…

IP capable devices

AMQP/HTTP, C, .NET, Java

Low power devices

(RTOS)

End-to-end stream processing architecture

Presentation Transformation

Processing Long term storage

CollectionProducers

App insights

Data analytics

State over time

Dashboard

Service

Search

Distributed tracing

-

Azure DBs

Azure Storage

Service Bus

HDInsight

2

3

4

1

Event Hubs

Fieldgateway

Custom Cloud

gateway

Storage Adapters

Stream Analytics

Page 22: MICROSOFT E IL MONDO IOT

Gateway Sensor Device Gateway

Cloud10010

010011

No Gateway Field Gateway Cloud Gateway

• Devices with

connection

capabilities

• Devices with

Security Layer

support

• Applications

• Concrete scenarios

with several low-

cost devices

• Scenarios where

repair or replace

devices and sensors

is hard or expensive

• Devices which use

incopatible

protocols (like MQTT

or custom protocols)

Page 23: MICROSOFT E IL MONDO IOT

HTTPMQTT

CoAP

Sensor Device Gateway

Cloud10010

010011IoT main protocols

• Client/Server

• Synchronous

• REST architecture for CRUD operations on resources

• No QOS (based on TCP)

• HTTPS (HTTP over SSL/TLS)

AMQP• Broker/Clients

• Multiplexing sessions/links on the same TCP connection

• Message• Header (system and

custom/user properties)• Opaque body (any format)• Data types system and

metadata

• QOS (at most once, at least once, exactly once)

• SSL/TLS and SASL

• HTTP-like (via UDP)

• Client/Server

• (also) Asynchronous - Observer

• QOS with “confirmable” message or not

• DTLS (Datagram TLS)

• Broker/Clients

• Connection oriented via TCP

• Very simple, smallest packet (2 bytes)

• Payload agnostic• No data types and

metadata• Any data format

• Topics based

• QOS (at most once, at least once, exactly once)

• SSL/TLS

Page 24: MICROSOFT E IL MONDO IOT

Field Gateway

Device Connectivity & Management

Analytics & Operationalized Insights

Presentation & Business Connectivity

IoT Device & Cloud PatternsD

evi

ces

RTO

S, L

inux,

Win

dow

s, A

ndro

id, i

OS

Protocol Adaptation

Batch Analytics & Visualizations

Azure HDInsight, AzureML, Power BI,

Azure Data Factory

Hot Path Analytics

Azure Stream Analytics, Azure HDInsight Storm

Presentation &

Business Connectivity

App Service, Websites

Dynamics, Notification Hubs

Hot Path Business Logic

Service Fabric & Actor Framework

Cloud Gateway

Event Hubs&IoT Hub

Field Gateway

Protocol Adaptation

Page 25: MICROSOFT E IL MONDO IOT

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

{ }

Page 26: MICROSOFT E IL MONDO IOT

dem

o

https://github.com/msopentech/connectthedots

Page 27: MICROSOFT E IL MONDO IOT

Demo – sensors, devices, gateway

GSR sensor

Heart Rate sensor

Seeedstudio Grove

Arduino Uno

Raspberry Pi

Page 28: MICROSOFT E IL MONDO IOT

https://github.com/msopentech/connectthedots

Page 29: MICROSOFT E IL MONDO IOT

Teach the system with your own GSR values

GSR sensor connected to Analog Input

HR sensor connected to Digital Input

Sensor Device Gateway

Cloud10010

010011

Page 30: MICROSOFT E IL MONDO IOT

HR sensor works as interrupt. The interrupt service routine includes the heart rate calculation

Abnormal GSR values: 50 points higher or lower than the threshold

...

Sensor Device Gateway

Cloud10010

010011

Page 31: MICROSOFT E IL MONDO IOT

Communication between device and gateway

Sensor Device Gateway

Cloud10010

010011

Page 32: MICROSOFT E IL MONDO IOT

Raspberry

Raspberry reads data sent by Arduino from serial port

After a check on the serial port, Raspberry wraps the message in order to meet AMQP protocol

Sensor Device Gateway

Cloud10010

010011

Page 33: MICROSOFT E IL MONDO IOT

Connecting to the cloudIn order to send the data to my event hubs I need to insert my subscription details in the code running on Raspberry.

Sensor Device Gateway

Cloud10010

010011

Page 34: MICROSOFT E IL MONDO IOT

Connection between the gateway and the cloud

Sensor Device Gateway

Cloud10010

010011

In this demo, we decided to use AMQP to send data

from the gateway to Event Hubs.

Page 35: MICROSOFT E IL MONDO IOT

Azure Event Hubs

Event Producers

Azure Event Hub

> 1M Producers> 1GB/sec Aggregate Throughput

Up to 32 partitions via

portal, more on request

Part

itio

ns

Direct

PartitionKey

Hash

Throughput Units:• 1 ≤ TUs ≤ Partition Count• TU: 1 MB/s writes, 2 MB/s

reads

Consumer Group(s)

Receivers

AMQP 1.0Credit-based flow controlClient-side cursorsOffset by Id or Timestamp

Event Processor Host

IEventProcessor

Sensor Device Gateway

Cloud10010

010011

Page 36: MICROSOFT E IL MONDO IOT

OUTPUT[Result of Query]

Azure SQL DB

Azure Event Hubs

Azure Blob Storage

INPUT

Source of Events

Azure Blob Storage

Azure Event Hubs

Reference Data

Query runs continuously against incoming stream of events

Stream Analytics

Query

Events

Have a defined schema and are

temporal (sequenced in time)

Azure Stream Analytics Sensor Device Gateway

Cloud10010

010011

Page 37: MICROSOFT E IL MONDO IOT

Tumbling Window

1 5 4 26 8 6 5

0 10 4020 30 Time (secs)

1 5 4 26

8 6

50

A 20-second Tumbling Window

60

3 6 1

5 3 6 1

Tumbling windows:

• Repeat

• Are non-overlapping

SELECT TollId, COUNT(*)

FROM EntryStream TIMESTAMP BY EntryTime

GROUP BY TollId, TumblingWindow(second, 20)

Query: Count the total number of vehicles entering each toll booth every interval of 20 seconds.

An event can belong to only one tumbling window

Page 38: MICROSOFT E IL MONDO IOT

SELECT Max(time) as time, Max(temp) as TempMax, Min(temp) as TempMin, Avg(temp) as tempAvgFROM DevicesInput TIMESTAMP BY timeGROUP BY TumblingWindow(Minute, 1)SELECT 'LIE' as alertType, 'Why are you lying?!?!? :)' as message, dspl as dsplAlert,Avg(lght) as hr,max(time) as timeStart, max(time) as timeEnd, Max(temp) as tempMax, Min(temp) as tempMin, Avg(gsrth) as gsrthFROM DevicesInput TIMESTAMP BY timeGROUP BY dspl, TumblingWindow(Second, 5)HAVING (tempMin < (gsrth-50) OR tempMax > (gsrth+50)) AND (hr > 80)

ehdevices

ehdevices

ehalerts

Stream Analytics Web App

Sensor Device Gateway

Cloud10010

010011

Page 39: MICROSOFT E IL MONDO IOT

Azure Web App

Raw data shown with graphs come directly from Event Hubs

Aggregations and Alerts are generated by Stream Analytics

Page 40: MICROSOFT E IL MONDO IOT

PowerBI integration

Page 41: MICROSOFT E IL MONDO IOT

Questions?

Page 42: MICROSOFT E IL MONDO IOT

Thank you

Grazie a tutti per la partecipazione

Riceverete il link per il download a slide e demo via email nei prossimi giorni

Per contattarmi

@_ericabarone [email protected]