Top Banner
DEVOPS / IOT How I built submerged using Azure Functions, IoT and Stream Analytics Jasper Siegmund
29

using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

May 31, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

How I built submergedusing Azure Functions, IoT and Stream

Analytics

Jasper Siegmund

Page 2: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Session Overview• Solution Architecture

• Getting data to Azure

• Storing data

• Acting on data

• Surfacing everything in an app

• Sending commands

Page 3: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 4: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Functions

Page 5: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Getting data to Azure

Functions

Page 6: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Azure IoT Hub

Getting data to Azure

• Gather telemetry data and send to Azure (gateway)

• Security by design• Per device authentication

• Encryption

• Device 2 cloud messaging

• Cloud 2 device messaging

• Device registry

• Platform SDK’s

Page 7: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Analyzing & Storing data

Functions

Page 8: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Getting data to Azure

• BLOB storagelow cost for lots of (long term) space

• DocumentDBbetter suited for configuration-type data

• Stream analytics output options:

• SQL database

• Blob storage

• Event hub

• Table storage

• Service bus Queue

• Service bus Topic

• DocumentDB

• Power BI

Azure Storage

Page 9: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Functions

Acting on data

Page 10: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Acting on data• Using reference data to route

actionable data to event hub.

• Function connected to event hub handles events and takes appropriate action.

• Do you need an action on every event?

• Alternative: logic apps

Azure Functions

Azure Stream Analytics

Azure Event Hub

Page 11: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Functions

Surfacing everything in an app

Page 12: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Surfacing in an app• Supported notification services:

• Apple (APNS)

• Google (GCM)

• Windows (WNS)

• Windows Phone (MPNS)

• Amazon (ADM)

• Baidu (Android China)

• Using Mobile Service Client JavaScript library to connect Cordova app to Azure• Authentication (ADAL)

• InvokeApi

• Push messages

Azure Notification Hub

Azure App Service

Azure API Apps

Page 13: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Functions

Sending commands back

Page 14: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Sending commands• Device 2 Cloud messaging

• Message receivedMessage = await

_deviceClient.ReceiveAsync();

Azure App Service

Azure IoT Hub

Page 15: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 16: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOTDEVOPS / IOT

demo

Page 17: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Event Hub

Storage blobs DocumentDB

WebAPI

Stream Analytics

Azure

Active Directory

Mobile

App

IoT Hub Notification

Hub

Azure solution Architecture

Raspberry Pi 2 Gateway

Arduino +

Sensors

Arduino +

Sensors

Functions

Page 18: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Learning MoreIoT Suite remote monitoring sample

https://github.com/Azure/azure-iot-remote-monitoring

Get started with Visual Studio Tools for Apache Cordova

https://taco.visualstudio.com/en-us/docs/get-started-first-mobile-app/

Aquarium Monitor blog series

http://blog.repsaj.nl/index.php/2016/01/iot-my-steps-to-an-aquarium-monitor/

//build 2016 IoT codelabs

https://github.com/Microsoft-Build-2016/CodeLabs-IoTDev

Page 19: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Jasper Siegmund

Blog blog.repsaj.nl

Twitter @jsiegmund

LinkedIn linkedin.com/in/jsiegmund

Work www.mstack.nl

Page 20: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOTDEVOPS / IOT

vragen

Page 21: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Volgende sessie 16:00 – 17:00

10 reasons why to move to

System Center Configuration

Manager as a service

Peter Daalmans & Kenneth van Surksum

Page 22: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Detailed architecture

Page 23: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 24: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 25: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 26: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 27: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 28: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT

Page 29: using Azure Functions, IoT and Stream Analytics · DEVOPS / IOT Event Hub Storage blobs DocumentDB WebAPI Stream Analytics Azure Active Directory Mobile App IoT Hub Notification Hub

DEVOPS / IOT