WPC 042 Data ON THE ROAD the Io


































- Slides: 34
WPC 042 - Data ON THE ROAD: the Io. T architecture Erica Barone Microsoft Technical Evangelist – Io. T & Windows erica. barone@microsoft. com PRESENTA
Agenda • Io. T solutions: the importance of data • A concrete scenario: My. Driving • Io. T Architecture Devices Field Gateway Io. T Hub Stream Analytics Power. BI www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 2
Io. T: gain value from Your Things Connectivity Data Analytics Action Io. T is not just about collecting data, it’s about how you can use these data to gain VALUE Money New Business Models www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 Happy Customers 3
Data. . . ? • Where can I find useful data? • How can simple data transform my business? • How can I manage these data to transform into concrete value?
Concrete scenario: car insurance DRIVER AGE (less than 21 years old, more than 65 years old, etc) KM per year VEHICLE CHARACTERISTICS (cubic capacity, kind of vehicle, etc) COVERAGE PARAMETERS (insurance ceilings, weathering, vandalism, fire and theft, etc) CITY OF RESIDENCE (and of main drives) TRAFFIC COLLISIONS In the recent period
REAL drivers
• Speed along the road Data could help improve the insights • Usage of the car: trip frequency and trip duration • Time slots of the trips: early morning, late afternoon, night, etc • Top paths: traffic, kind of roads, etc • Drive style: avg speed, hard stops, hard accelerations, etc • Integration with public traffic systems: autovelox, red light cameras, speed limits on the top paths, etc
Azure Io. T Reference Architecture Data Processing, Analytics and Management Device Connectivity and Management IP capable devices Business Connectivity Provisioning API Io. T Client App Backend Solution UX Personal mobile devices Device Registry Device State Store Existing Io. T devices Cloud Gateway Io. T Client Stream Processors Gateway Low power devices Io. T Client Storage Analytics & Machine Learning Business Integration Connectors and Gateway(s) Business systems Data Path Optional solution component Azure Io. T solution component www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 8
DEMO My. Driving www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 9
My. Driving Architecture
On Boarding Diagnostic Device For Android & Windows (Bluetooth) For i. OS (Wi-Fi)
Device connectivity and management End user Io. T gateway scenarios Device Connectivity and Management IP capable devices Io. T Client Existing Io. T devices Io. T Hub Io. T Client Gateway Low power devices Io. T Client Security and Isolation of Devices Bridge networks and isolate public Internet Ensure cloud security and encryption Integration with any device Low resource devices Device agents can be simplified Connect new and legacy devices Cloud Offload Run logic on premises to reduce network and cloud consumption Low-latency / critical messages Segregate message types Edge processing Enable time-sensitive decisions Run edge analytics Auditing - Central choke point to apply data policies Batching Optimize bandwidth and messages www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 12
Field Gateway WHY A FIELD GATEWAY? • Most ODB dongles are not internet-capable • The wireless connection used by ODB devices might not be secure • The device MUST be able to use one of the secure protocols supported by Io. T Hub (HTTPS, AMQPS, MQTT) WHY A PHONE AS FIELD GATEWAY? • Most drivers already have a phone to be used as field gateway • It’s easy and cheap: you just have to download and install the app • The phone works as an opaque field gateway • Additional data (like GPS data) can be collected using the phone, and can be merged with the ones from ODB device • The phone caches local data for later visualization purposes • (if you don’t have a ODB device, the my. Driving app simulates ODB data) Xamarin App
my. Driving App – data flow 1 User Authentication Device provisioning Device. Client creation using connection string Polling on ODB device every second to retrieve data Local GPS data every 3 secs / 5 m Integration: message setup and send. Event to Io. THub 2 Io. T Field Gateway • • • 3 Data Visualization • Past. Trips • Profile view (aggregate data)
Azure Io. T Hub Hyper scale Io. T solution Cloud-scale messaging Two-way communication Per-device authentication Multi-protocol support Cloud-scale gateway www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 15
Io. T Hub Security Operational monitoring Device SDKs Provisioning • Create an entry for the device in the Device Identity Registry of our Io. THub. This creates a unique identity with an associated key. • Install the device key on the device, to enable it to connect to Io. T Hub
Azure Io. T Hub Telemetry HTTPS, AMQPS, MQTT Device / Gateway Device Telemetry (All Devices) Command Control (Per Device) Io. T Cloud Solution Device (Object) Service Properties Device App Device Properties Tags Your Code Device Management Objects DM Client Library Registry Manager API Create, Update, Delete Devices Management LWM 2 M over Co. AP/TCP Application Your Code Device Query API Tags, Device and Service Properties Device Jobs API Create, Monitor, Cancel Device Management APIs www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 17
Device-to-cloud messages Io. T Hub D 2 C send endpoint Interface C 2 D queue endpoint AMQP, HTTPS, MQTT device-side endpoint AMQP service-side endpoint Device and service SDKs Device id C 2 D send endpoint Device … Compatible with Event Hubs Device … Partitioned receiver, client check-pointing Integrations with Azure Stream Analytics, Storm, … 100% compatible with Event Hubs receivers Io. T Hub management Consumer Group j Consumer Group 1 Io. T Hub services for D 2 C Millions of simultaneously connected devices Per-device authentication Connection-multiplexing: C 2 D and D 2 C traffic Across multiple devices for gateway scenarios D 2 C receive endpoint Partition 1 D 2 C send endpoint Partition 2 Callback partition 1 Callback partition n Partition n D 2 C receive endpoint www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 Worker k Callback partition z Callback partition 2 18
Io. T Hub - Device Management concepts y r e Qu n i Tw s b o J www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 19
Data Processing, Analytics and Management Azure Stream Analytics Provisioning API • Real Time analytics App Backend Solution UX Device Registry • No challenges with scale Device State Store Cloud Gateway Stream Processors Storage • Fully managed Analytics & Machine Learning Business Integration Connectors and Gateway(s) www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 • Rapid development • Built in temporal semantics 20
Azure Stream Analytics Components of an Azure Stream Analytics Application Azure Io. T Hub Azure Blob Storage Events Azure SQL DB Have a defined schema and are temporal (sequenced in time) Azure Blob Storage Azure Event Hubs Reference Data Query runs continuously against incoming stream of events www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 21
Stream Analytics in my. Driving SA Job Path Output Name mydriving-sqlbi Real time hot-path Power. BISink SQLSink Usage Real-time aggregate data for consumption by Power BI. Real-time aggregate data for consumption by App Service APIs (and thus the mobile app). mydrivinghourlypbi Real time hot-path Power. BISink A second hourly aggregation of real-time data for Power BI. mydrivingvinlookup Extensions EHSink Runs a simple query to extract the VIN number from a trip, and sends to Event Hubs for extensibility mydriving-archive Aggregate coldpath Blob. Sink Sends real-time data to blob storage where it accumulates for longer periods of time, for later processing by HDInsight and visualization in Power BI and for retraining Machine Learning
Stream Analytics: mydriving-sqlbi INPUT OUTPUT Power. BI – data visualization Io. THub data SQL DB – data consumed by App Service QUERY Trip. Point. Raw Purpose: shaping the incoming Io. T data Trip. Point. Agg Purpose: aggregation (max, min, avg) Rough. Driving. Stats Purpose: creating driving statistics Query to route the specific data to Power. BISink
Stream Analytics - Queries
Tumbling Window Tumbling windows: A 20 -second Tumbling Window 1 5 4 6 2 8 6 5 3 6 • Repeat • Are non-overlapping 1 Time (secs) 1 5 4 6 2 8 An event can belong to only one tumbling window Query: Count the total number of vehicles entering each toll booth every interval of 20 seconds. 6 5 3 6 1 SELECT Toll. Id, COUNT(*) FROM Entry. Stream TIMESTAMP BY Entry. Time GROUP BY Toll. Id, Tumbling. Window(second, 20) www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 25
Business Connectivity Solution UX Business Integration Connectors and Gateway(s) Personal mobile devices Business systems Power. BI • Live dashboards provide a 360º view of your business • Track your data in real-time with support for streaming data • Drill through to underlying reports to explore in more detail • Pin new visualizations and KPIs to monitor performance www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 26
Power. BI • Dataset • Report • Dashboard • Workspaces
Power. BI Pre-built content packs, consisting of dashboards and reports, for popular Saa. S solutions Real-time dashboard updates Secure, live connection to your data sources, on-premises and in the cloud Intuitive data exploration by using natural language query Integration with familiar Microsoft products, and commitment for scale and availability in Azure Fast deployment, hybrid configuration, secure, and integrated with existing IT systems www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 28
Power BI Data sources Power BI service Saa. S solutions E. g. Marketo, Salesforce, Git. Hub, Google analytics Content packs Natural language query Sharing & collaboration On-premises data E. g. Analysis Services Live dashboards Organizational content packs Corporate data sources, or external data services Visualizations Azure services E. g. Azure SQL, Stream Analytics Reports Excel files Workbook data or data models Power BI Desktop files Related data from files, databases, Azure, and other sources 01001 10101 Datasets Data refresh www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 29
DEMO My. Driving www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 30
What’s more? mydriving-vinlookup Event Hub Storage - Blob Xamarin App (device) Service Fabric Machine Learning mydriving-archive mydriving. Analytics. DB Io. T Hub mydriving-sqlpbi mydriving. DB Data Factory Car (Sensor) mydriving-hourlypbi HDInsight Power BI
Follow the next session to learn more: WPC 047 - Data ON THE ROAD: the Azure part Jessica Tibaldi
Q&A www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 33
Over. Net Education Contatti Over. Net Education info@overneteducation. it www. overneteducation. it Tel. 02 365738 @overnete www. facebook. com/Over. Net. Education www. linkedin. com/company/overnet-solutions www. wpc 2016. it – info@wpc 2016. it - +39 02 365738. 11 34