wi003 dal sensore al cloud: iot & microsoft azure€¦ · medical devices automation devices...

56
presenta www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 1 WI003 Dal sensore al cloud: IoT & Microsoft Azure Erica Barone Microsoft Tech Evangelist Windows & IoT @_ericabarone [email protected] Jessica Tibaldi Microsoft Tech Evangelist Azure & Startup @_jetiba [email protected]

Upload: doandiep

Post on 19-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

presenta

www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 1

WI003 Dal sensore al cloud: IoT & Microsoft AzureErica Barone

Microsoft Tech Evangelist Windows & IoT

@_ericabarone

[email protected]

Jessica Tibaldi

Microsoft Tech Evangelist Azure & Startup

@_jetiba

[email protected]

www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 2

IoT: 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

MoneyHappy

Customers

New Business

Models

www.wpc2015.it – [email protected] - +39 02 365738.11

3

Many “Things”

Connect devices that empower

and enable your people

…and connect to other “things” across your

enterprise

Microsoft IoT Services

…and use services that allow you to connect and manage

the Internet of your things, and transform your business with

insights.

Other “things”

Vehicles

SensorsChips

Buildings and Infrastructure Assets

LoB Assets

Devices

POS Terminals

Industrial devices ATMs

Medicaldevices

AutomationDevices

PCs/Laptops

HandheldScanners

TabletsSmart Phones

Power BI

for Office 365

Line-of-Business

Services

Cloud Platform and Services

Data and BI

Services

HDInsight

Microsoft Azure Machine Learning

Microsoft Azure Intelligent Systems Service

Microsoft’s view

“ ”

IoT Industry &

IT Partners

Vehicles

SensorsChips

Buildings and Infrastructure Assets

LoB Assets

POS Terminals

Industrial devices ATMs

Medicaldevices

AutomationDevices

PCs/Laptops

HandheldScanners

TabletsSmart Phones

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

www.wpc2015.it – [email protected] - +39 02 365738.11 6

Windows 10

Windows 10

Phone Small Tablet2-in-1s

(Tablet or Laptop)Desktops

& All-in-OnesPhablet Large TabletClassic Laptop

XboxIoT

Surface Hub

Holographic

www.wpc2015.it – [email protected] - +39 02 365738.11 7

Universal Windows Platform

XboxIoTUniversal

Windows Platform

Middleware Platforms

Middleware Partners (e.g., Xamarin)

Game Engine Partners (e.g., Unity)

Windows Platform

Universal Windows 8 Apps (C++/C#/JS)

Universal Windows 10 Apps (C++/C#/JS)

Web Platform

Microsoft Edge HTML Engine

Cordova Tooling (HTML/JS)

Hosted Web Apps (HTML/JS)

Other Mobile Platforms

Project Islandwood (Objective C/C++)

www.wpc2015.it – [email protected] - +39 02 365738.11 8

Windows 10 IoT Editions

For Industry Devices

Windows 10 Enterprise (IoT)

Desktop Shell, Win32 apps

1 GB RAM, 16 GB Storage

For Mobile Devices

Windows 10 Mobile

Enterprise (IoT)

Modern Shell

Mobile Chassis requirement

512 MB RAM, 4 GB storage

For Small Devices

Windows 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

www.wpc2015.it – [email protected] - +39 02 365738.11 9

Windows Universal App Platform

• Converged APIs, write ONE Universal App and target all Windows 10 editions

• Scale and get higher ROI by selling same App to all Windows 10 editions

Languages

• C++ /CX

• C#, VB

• JS

• Python

• Node.js

APIs

• WinRT

• Win32

• .NET

• Wiring

Deployment and

Execution

• APPX

• XCopy

• App Isolation

UI Frameworks

• HTML

• Xaml

• DirectX

Tools

• Visual Studio

• PowerShell

www.wpc2015.it – [email protected] - +39 02 365738.11 10

One App Platform for multiple device families

One App Platform

Commonstore and dev center

Common APIsand SDK

Commontoolset

Adaptive user interface

Naturaluser inputs

Build your first app on Windows 10 IoT Core

www.wpc2015.it – [email protected] - +39 02 365738.11 11

www.wpc2015.it – [email protected] - +39 02 365738.11

www.windowsondevices.com

www.wpc2015.it – [email protected] - +39 02 365738.11 13

www.windowsondevices.com

www.wpc2015.it – [email protected] - +39 02 365738.11 14

www.wpc2015.it – [email protected] - +39 02 365738.11 15

File > New > Project

www.wpc2015.it – [email protected] - +39 02 365738.11 16

Windows Device Family Extension SDKs

Right click on the project > Add > Reference

www.wpc2015.it – [email protected] - +39 02 365738.11 17

Remote machine deployment

IoT: Connection and Interconnection

www.wpc2015.it – [email protected] - +39 02 365738.11 20

Devices interconnection: AllJoin support on Windows10

I can send notifications

I have lighting interface

I can send notifications.

I have a clock interface

I display notifications.

I have the clock interface!

I display notifications.

I have the clock interface!

I display notifications.

I have the clock interface!

I can send and display notifications

I can send notifications

72°

120

80

Your Devices Work TogetherAcross Protocol and Ecosystem Barriers

Discovery

Cross Platform

Management

Interoperability

Open Source

Security

AllJoyn support on Windows 10

www.wpc2015.it – [email protected] - +39 02 365738.11 21

www.wpc2015.it – [email protected] - +39 02 365738.11 22

NOW PLAYING:

Artist: FlowersSong: Daisy

FridgeCloud

LaundryCloud

Lighting BCloud

Speaker BCloud

Speaker ACloud

TVCloud

Lighting ACloud

Lighting CCloud

SecurityCamera Cloud Home Automation

www.wpc2015.it – [email protected] - +39 02 365738.11 23

AllSeen & AllJoyn

The AllSeen Alliance is a non-profit consortium that oversees AllJoyn.

Stated focus is to enable the “Internet of Everything”. Value is in

ecosystem alignment and investment in AllSeen

AllJoyn is an open source communication framework that enables apps

and devices to communicate regardless of connection specifics and OS

platform.

The AllSeen Alliance is a Linux Foundation Collaborative Project.

https://ms-iot.github.io/content/en-US/win10/AllJoyn.htm

www.wpc2015.it – [email protected] - +39 02 365738.11 24

AllSeen Alliance members

Sponsored Members

...and more

www.wpc2015.it – [email protected] - +39 02 365738.11 25

IoT Barrier: Proprietary Solutions

IHV Protocol Std. Protocol IHV/ISV API Closed System

www.wpc2015.it – [email protected] - +39 02 365738.11 26

AllJoyn Enables IoT Device Interoperability

Consumer (client)

Producer (server)

www.wpc2015.it – [email protected] - +39 02 365738.11 34

Useful links

• AllSeen Alliance: http://allseenalliance.org

• Windows 10 IoT: http://windowsondevices.com

• MSDN documentation for Windows 10 AllJoyn

• AllJoyn Troubleshooting guide

https://channel9.msdn.com/Blogs/Internet-of-Things-Blog/Using-the-AllJoyn--Studio-Extension

Follow the sample

https://wiki.allseenalliance.org/gateway/dsb

Device System Brigde Project

www.wpc2015.it – [email protected] - +39 02 365738.11 35

Telemetry

Information flows

from device to other

systems for

conveying status

changes in the device

Inquiries

Requests from

devices looking to

gather required

information or asking

to initiate activities

Commands

Commands from

other systems to a

device or a group of

devices to perform

specific activities

Notifications

Information flows from

other systems to a

device (-group) for

conveying status

changes in the world

1:N 1:N

IoT communication patterns

www.wpc2015.it – [email protected] - +39 02 365738.11 36

Sensor Device Gateway Cloud10010 010011

Different

technologies

Different

protocols to

send data to

the cloud

USB

HTTP

Telemetry system architecture

www.wpc2015.it – [email protected] - +39 02 365738.11 37

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)

www.wpc2015.it – [email protected] - +39 02 365738.11 38

IoT main protocolsHTTP

MQTT

CoAP

Sensor Device Gateway Cloud10010 010011

• 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

IoT on the cloud:Azure IoT Services

www.wpc2015.it – [email protected] - +39 02 365738.11 39

Azure IoT Suite

www.wpc2015.it – [email protected] - +39 02 365738.11 40

IoT Solution Architecture

Benefit from a comprehensive solution

Analyze and act

on new data

Integrate and transform

business processesConnect and scale

with efficiency

And

more

Real-time

operating

systems

Device Registry

Rules and Actions

Analytics

Dashboards & Visualization

Azure IoT Suite

PredictiveMaintenance

RemoteMonitoring

Asset Management

DEMO Preconfigured Solutions:

Remote Monitoring

What you get with remote monitoring preconfigured solution

Devices

Azure IoT Suite Remote Monitoring

Back end

systems

and

processesC# simulator

Event Hub

Storage blobs DocumentDB

Web/Mobile App

Stream AnalyticsLogic Apps

Azure

Active Directory

IoT HubWeb Jobs

Power BI

Azure IoT Hub

Azure IoT Hub

Designed for IoT

Service assisted communications

Cloud-scale messaging

Cloud-facing telemetry ingestion

Per-device authentication

Connection multiplexing

Multi-protocol support

Multi-platform

IoT Hub endpoints

device

Event processing(hot and cold path)

Device provisioning and management

Your IoT Hub

Device id

C2D queue

endpoint

D2C send

endpoint

Device …

Device …

Device …

D2C receive endpoint

C2D send endpoint

Msg feedback and monitoring endpoint

Device identity managementIoT Hub

management

Device business logic,Connectivity monitoring

Field GW /Cloud GW

• Simple navigationManagement of devices, volume and scaling made easy through the IoT Hub settings in the Azure Management Portal

Manage IoT Hub in Azure portal

Azure Stream Analytics

Real time event processing

High volumeAnalyze millions of data points per second

Highly scalableEnterprise grade, predictable solution.

Uncover real time insightsPerform real time analytics across multiple streams

Rapid DeploymentUse simple SQL syntax, auto distributed for scale

Mission critical reliabilityFully managed, low latency, high throughput

Create real time alertsFlag alerts and alarms for attention

Application Components

Components of an Azure Stream Analytics Application

Azure SQL DB

Azure Event Hubs

Azure Blob StorageAzure Blob Storage

Azure IoT Hub

Reference Data

Query runs continuously against incoming stream of events

Events

Have a defined schema and

are temporal (sequenced in

time)

• Rule based interfaceSimple implementation and rule development using ASA UI.

• Multi-channelAnalyze multiple channels of information simultaneously, in real time.

Add or edit jobs using simple ASA interface

Query Language - Overview

DML Statements

• SELECT

• FROM

• WHERE

• GROUP BY

• HAVING

• CASE

• JOIN

• UNION

Windowing Extensions

• Tumbling Window

• Hopping Window

• Sliding Window

• Duration

Aggregate Functions

• SUM

• COUNT

• AVG

• MIN

• MAX

Date and Time Functions

• DATENAME

• DATEPART

• DAY

• MONTH

• YEAR

• DATETIMEFROMPARTS

• DATEDIFF

• DATADD String Functions

• LEN

• CONCAT

• CHARINDEX

• SUBSTRING

• PATINDEX

Scaling Functions

• WITH

• PARTITION BY

Windowing Concepts

1 5 4 26 8 6 4

t1 t2 t5 t6t3 t4

Time

• Event arrive at different times i.e. have unique timestamps

• Events arrive at different rates (events/sec).

• In any given period of time there may be 0, 1 or more events

Windowing is a core requirement for

streaming analytic applications

Common requirement to perform some set-

based operation (count, aggregation etc)

over events that arrive within a specified

period of time

Azure Stream Analytics supports three types

of windows: Hopping, Sliding and Tumbling

Every window operation outputs events at the

end of the window

The output of the window will be single event

based on the aggregate function used. The

event will have the time stamp of the window

All windows have a fixed length

All windows should be used in a GROUP BY

clause

Window 1 Window 2 Window 3

Aggregate

Function (Sum)

18 14Output Events

Tumbling Window

1 5 4 26 8 6 5

Time

(secs)

1 5 4 26

8 6

A 20-second Tumbling Window

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

Hopping Window

1 5 4 26 8 6

A 20-second Hopping Window with a 10 second “Hop” Hopping windows:

• Repeat

• Can overlap

• Hop forward in time by a fixed period

Same as tumbling window if hop size = window

size

Events can belong to more than one hopping

window

SELECT COUNT(*), TollId

FROM EntryStream TIMESTAMP BY EntryTime

GROUP BY TollId, HoppingWindow (second, 20,10)

4 26

8 6

5 3 6 1

1 5 4 26

8 6 5 3

6 15 3

QUERY: Count the number of vehicles entering each toll booth every

interval of 20 seconds; update results every 10 seconds

Sliding Window

1 5

A 20-second Sliding WindowSliding window:

• Continuously moves forward by an € (epsilon)

• Produces an output only during the occurrence

of an event

• Every windows will have at least one event

Events can belong to more than one sliding

window

SELECT TollId, Count(*)

FROM EntryStream ES

GROUP BY TollId, SlidingWindow (second, 20)

HAVING Count(*) > 10

Query: Find all the toll booths which have served more than 10 vehicles in

the last 20 seconds

1

8

8

5 1

9

5 1 9

Power BI

Data visualization with PowerBI

Real time capabilitiesIngest, analyze and display data as it happens

Secure accessSecure, live communication with data source

Query dataIntuitive, natural language query tool

Integrated systemsIntegrate with other business systems and enrich device data with intelligence from other business systems, eg: CRM, ERP

Highly accessible analyticsCloud based dashboard and analytics tool

360º view of business KPI’sCustomize dashboards to address concerns and performance metrics.

Cross platform support View data via web platform, on any device

Pre-built dashboards Utilize standard dashboards for rapid deployment, based on popular solution demands.

• Rich visualsStandard and custom graphing options

• Custom dashboardsBuild heat maps and visually track data

• External dataIntegrate external data feeds to add value to device data, or pull in external information such as weather or market information.

Data visualization with PowerBI

Q&A

presenta

Grazie a tutti!