UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
Windows iot barone
1. Template designed by
Microsoft e il mondo IoT
Erica Barone
Microsoft Technical Evangelist Windows & IoT
@_ericabarone
erica.barone@microsoft.com
2. Internet of things
Microsoft’s point of view: Internet of Your Things
End-to-end IoT scenario: from your sensor to Microsoft Azure
Agenda
3. 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”
4. What kind of «value»?
Money Happy Customers
New Business Models
5. IoT is an Inflection Point
Hardware
is cheap
Connectivity
is pervasive
Development
is easy
New Innovative
Scenarios
Huge benefits
fuel demand
8. 26 Billion
of connected
devices
2020 Forecast*
7.3 Billion
of tablets
and PCs
InsuranceManufacturing Healthcare
Vertical leading industries
TransportationUtilities Agricolture
Other industries gaining value from IoT
*Source: Gartner http://www.gartner.com/newsroom/id/2636073
9.
10. 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 analysis
Fraud
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…
11. Example
• Damage is reported by customer or during
weekly restocking routes
• Technician must be scheduled
to investigate
• Process take up to 8 days to fix
a broken machine
• Sensor data is used to monitor cooler
condition in real-time
• Broken coolers are identified
at 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&MACHINELEARNING
Days: Days:Days:
12.
13. 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.
14. 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
15. Windows 10
Windows 10
Phone Small Tablet
2-in-1s
(Tablet or Laptop)
Desktops
& All-in-OnesPhablet Large Tablet
Classic
Laptop
Xbox
IoT
Surface Hub
Holographic
16. 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
17. Azure IoT services
Accelerate your business transformation
Microsoft Azure IoT Suite
Azure IoT Suite
Predictive MaintenanceRemote Monitoring Asset Management
And more…
Addresses
common
scenarios:
Enables
you to Mine data Take actionConnect assets
M o n i t o r i n g
18. End to End Scenario:
From your sensor to Microsoft Azure
20. Telemetry system architecture
Sensor Device Gateway Cloud
10010 010011
Different
technologies
Different
protocols to
send data to
the cloud
USB
HTTP
21. Legacy IOT
MQTT/COAP/Custom
Applications
AMQP/HTTP, C, .NET,
Java…
IP capable
devices
AMQP/HTTP, C, .NET, Java
Low power
devices
(RTOS)
End-to-end stream processing architecture
ProcessingCollectionProducers
App insights
Data analytics
State over time
Dashboard
Service
Search
Distributed
tracing
-
Azure DBs
Azure Storage
Service Bus
HDInsight
Event Hubs
Field
gateway
Custom Cloud
gateway
Storage Adapters
Stream Analytics
22. Gateway Sensor Device Gateway Cloud
10010 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)
23. HTTP
MQTT
CoAP
Sensor Device Gateway Cloud
10010 010011
IoT 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
24. Field
Gateway
Device
Connectivity & Management
Analytics &
Operationalized Insights
Presentation &
Business Connectivity
Devices
RTOS,Linux,Windows,Android,iOS
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
25. 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
{ }
29. Teach the system with your own GSR values
GSR sensor connected to Analog Input
HR sensor connected to Digital Input
Sensor Device Gateway Cloud
10010 010011
30. 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 Cloud
10010 010011
32. 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 Cloud
10010 010011
33. Connecting to the cloud
In 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 Cloud
10010 010011
34. Connection between the gateway and the cloud
Sensor Device Gateway Cloud
10010 010011
In this demo, we decided to use AMQP to send data from
the gateway to Event Hubs.
35. Azure Event Hubs
Event
Producers
> 1M Producers
> 1GB/sec
Aggregate
Throughput
Up to 32 partitions
via portal, more on
request
Partitions
Direct
PartitionKey
Hash
Throughput Units:
• 1 ≤ TUs ≤ Partition Count
• TU: 1 MB/s writes, 2 MB/s reads
Receivers
AMQP 1.0
Credit-based flow control
Client-side cursors
Offset by Id or Timestamp
Sensor Device Gateway Cloud
10010 010011
36. AzureSQLDB
AzureEventHubs
AzureBlobStorage
INPUT
Source of Events
Azure BlobStorage
Azure EventHubs
ReferenceData
Queryrunscontinuouslyagainstincomingstreamofevents
Events
Have a defined schema and
are temporal (sequenced in
time)
Azure Stream Analytics Sensor Device Gateway Cloud
10010 010011
37. 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
38. SELECT Max(time) as time,
Max(temp) as TempMax,
Min(temp) as TempMin,
Avg(temp) as tempAvg
FROM DevicesInput TIMESTAMP BY time
GROUP 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 gsrth
FROM DevicesInput TIMESTAMPBY time
GROUP 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 Cloud
10010 010011
39. Azure Web App
Raw data shown with graphs
come directly from Event Hubs
Aggregations and Alerts are
generated by Stream Analytics
42. 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
erica.barone@microsoft.com
Notas do Editor
No MVA
No MVA
No MVA
Per il 2020 la connettività dei dispositivi diventerà uno STD, anche grazie alla riduzione dei costi delle componenti. Si potranno usare componenti dal costo inferiore a 1 dollaro da applicare agli oggetti per farli comunicare con internet e altri oggetti.
Avremo anche nuovi modelli di business: se si pensa alle assicurazioni, si può pensare a un monitoraggio di cert parametri sulla base dei quali è possibile calcolare la quota da pagare (usage-based insurance)
Ci saranno poi tecnologie sensor-specific (ad esempio nel manufacturing) e tecnologie diffuse (smart buildings)
Key goal of slide:
One of the key goals of data insight is to get predictive.
Through the central collection and processing of data, machine learning and algorithms can be applied to the data set to analyze the historical data and arrive at reasonable accuracy levels for future events.
This predictive approach can be applied in a number of ways, from simple notification, to alert and notification depending in the situation.
No MVA
No MVA
No MVA
Key goal of slide:
As we look at a deeper layer of detail for a scenario, it could look like this.
The producers are potentially like the 4 listed here. Apps, older devices, IP connected or smaller devices.
These may connect directly to Event Hubs in Azure, or they may hop through either Field or Cloud gateways where translation is performed.
As this diagram illustrates, the destination in Azure, Event Hubs, enables the data to take a route of 1 of 2 choices.
Either the data can be processed by tools like Stream Analytics, Storm or something custom, or it can be formatted for delivery to a specified storage location.
If Storage is the destination, there are a number of options, or even combinations that can be utilized. DB, Table, Blob, HDI or even back to a Service Bus could be engaged as a return loop for command and control scenarios.
Finally, the data travels through this infrastructure and may be presented in any number of ways
infine è necessario visualizzare i dati che sono stati elaborati in modo tale da poter effettuare delle valutazioni utili per il proprio business.
I servizi Azure che permettono la visualizzazione sono molteplici:
App Service: in particolare con Web App e Mobile App
servizi come il Notification Hub permettono di inviare una notifica nel caso in cui ci sia un valore per cui si debba prestare una particolare attenzione all’interno del flusso
oppure altri strumenti più complessi che MS mette a disposizione come il CRM Dynamics, che possono essere utilizzati per la presentazione dei dati in realtà enterprise
riassunto di tutti i servizi che possono essere applicati in una soluzione IOT end-to-end
molti di questi li abbiamo già affrontati
mi vorrei soffermare sui servizi di storage che non abbiamo visto finora
questi permettono di gestire l’archiviazione dei dati che sono letti dai device
Inserire una foto con tutti gli HW (+Band se riusciamo a metterlo)
Stream Analytics mi serve per fare un analisi del flusso dei dati in tempo reale. Non analizza il dato singolo, ma il flusso, senza perdere le caratteristiche. Ecco perchè usarlo per la telemetria
Un’applicazione tipica per l’analisi dei flussi ha una struttura come questa. I principali component sono:
Input – sorgenti degli eventi. Le sorgenti “proprie” di uno scenario di questo tipo sono device, macchine, applicazioni, sensori, etc. In ogni caso, ASA non è direttamente connesso a questi. La prima interfaccia con I dati che provengono da queste sorgenti è EH. ASA è ottimizzato per prendere il flusso di dati da EH e dagli Azure Blob.Azure Blob Storage is the likely place where log data is stored. The list of input sources that ASA directly integrates with may increase in the future, but Azure Event Hubs and Azure Blob Storage will be the primary sources.
Query – componente principale di ASA. Le query implementano la logica di analisi. Sono un set di trasformazioni che vengono applicate al flusso in inut per produrre un flusso di output. Le query sono l’unico element che gli sviluppatori di ASA devono effettivamente sviluppare/scrivere. Tutto il resto viene completamente gestito attraverso il portale di gestione di Azure. Una cosa molto importante da notare è che ASA supporta un linguaggio simile al SQL per le query, ma a differenza di un DB tradizionale queste query sono eseguite continuamente sullo streaming dei dati. Si fermano solo nel caso in cui vengano fermate manualmente o vanno in pausa nel momento in cui non ci sono dati da processare
Output – Quando una query viene eseguita, questa produce dati continuamente. Questi risultati possono essere memorizzati in Blob Storage, EH o in SQL Database su Azure. L’input processato e memorizzato in uno di questi servizi può essere riutilizzato come input di un nuovo processo. È quindi possibile concatenare tra loro diversi processi per effettuare una serie di trasformazioni sui dati che provengono dall’esterno.
Posso avere 2 input in stream analytics: il flusso corrente e un flusso che avevo memorizzato prima ad esempio in un blob storage. Stream Analytics può fare un’analisi continua del flusso sttuale rispetto a quello storico.
Tumbling windows specify a repeating, non-overlapping time interval of a fixed size.
Syntax: TUMBLINGWINDOW(timeunit, windowsize)
Timeunit – day, hour, minute, second, millisecond, microsecond, nanosecond.
Windowsize – a bigInteger that described the size (width) of a window.
Note that because tumbling windows are non-overlapping each event can only belong to one tumbling window.
The query just counts the numbers of vehicles passing the toll station every 20 seconds, grouped by Toll Id.