Top Banner
BUILDING IOT SOLUTIONS WITH NITROGEN Doug Seven, Director Microsoft DX-TED, Partner Catalyst Team @DSeven @ThingLabsIo
23
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: Building IoT Solutions with Nitrogen

BUILDING IOT SOLUTIONS WITH NITROGENDoug Seven, Director

Microsoft DX-TED, Partner Catalyst Team

@DSeven @ThingLabsIo

Page 2: Building IoT Solutions with Nitrogen
Page 3: Building IoT Solutions with Nitrogen
Page 4: Building IoT Solutions with Nitrogen
Page 5: Building IoT Solutions with Nitrogen
Page 6: Building IoT Solutions with Nitrogen

Field

Gate

ways Proto

col A

dapte

rsO

SS P

roje

ct

Clo

ud G

ate

way

Eve

nt

Hub ->

IoT H

ub

Hot Path AnalyticsAzure Stream Analytics, Azure Storm

Cold / Batch Analytics & Visualizations

Azure HDInsight, AzureML, Power BI, Azure Data Factory

Hot Path Business LogicPaaS V2 & Actor Framework E

nte

rprise

Pro

cess

Connect

ions

Biz

Talk

Serv

ices,

Notific

ation H

ubs

Devi

ces

Linux,

Andro

id, iO

S, RTO

S, W

indow

s

Device Connectivity

Analytics & Operationalized Insights

BusinessConnectivity

IOT DEVICE <-> CLOUD PATTERNS

Page 7: Building IoT Solutions with Nitrogen

Field

Gate

ways Proto

col A

dapte

rsO

SS P

roje

ct

Clo

ud G

ate

way

Eve

nt

Hub ->

IoT H

ub

Hot Path AnalyticsAzure Stream Analytics, Azure Storm

Cold / Batch Analytics & Visualizations

Azure HDInsight, AzureML, Power BI, Azure Data Factory

Hot Path Business LogicPaaS V2 & Actor Framework E

nte

rprise

Pro

cess

Connect

ions

Biz

Talk

Serv

ices,

Notific

ation H

ubs

Devi

ces

Linux,

Andro

id, iO

S, RTO

S, W

indow

s

Device Connectivity

Analytics & Operationalized Insights

BusinessConnectivity

IOT DEVICE <-> CLOUD PATTERNS

Page 8: Building IoT Solutions with Nitrogen

NITROGENNitrogen is an open-source, JavaScript backendfor the Internet of Things.

Nitrogen provides Device Management Security and permissions Data Ingest Command & Control

Nitrogen includes a JavaScript client library for device and web applications.

http://www.Nitrogen.io

Page 9: Building IoT Solutions with Nitrogen

PUB-SUB MESSAGING MODEL

Bad User

MotorizedBlinds

Rogue Light

Light Sensor

Nitrogen Service

Lighting App

Light

LightSwitch

Mobile App

Page 10: Building IoT Solutions with Nitrogen

NITROGEN MESSAGING

var message = new nitrogen.Message({ type: '_lightState', body: { on: false } });

var message = new nitrogen.Message({ type: '_lightLevel', body: { ambientLight: 51 } });

Page 11: Building IoT Solutions with Nitrogen

NITROGEN MESSAGE{

"ts":"2015-05-20T05:52:16.323Z",

"body":

{

"temperature":30

},

"type":"temperature“

}

Page 12: Building IoT Solutions with Nitrogen

DEMO

Sending Telemetry to Nitrogen

Page 13: Building IoT Solutions with Nitrogen

COMMAND & CONTROL Nitrogen enables sending messages or subscribing to message streams

Any device with permission can send a message to a specific device

Any device with permission can subscribe to the message stream of a device

Page 14: Building IoT Solutions with Nitrogen

NITROGEN COMMANDMANAGER The CommandManager enables interrogation and execution of commands

for a device.

CommandManager should be sub-classed for the specific implementation.

Sub-classes must override five (5) functions: isRelevant() isCommand() obsoletes() executeQueue() start()

Page 15: Building IoT Solutions with Nitrogen

IMPLEMENTING COMMANDMANAGER isRelevant

Should I care about the message?

isCommand Do I need to execute the message?

obsoletes Do I care any more? (e.g. have I already processed this)

executeQueue Do whatever needs to be done based on the message

start Get things going

Page 16: Building IoT Solutions with Nitrogen

PERMISSIONS Permissions enable control over which Principals can interact (or not) with

other Principals

Permission Types admin view send subscribe

Permissions enable explicit authorization control n2 permission add --action subscribe --authorized true --issueTo <PRINCIPAL ID> --principalFor <PRINCIPAL ID>

Page 17: Building IoT Solutions with Nitrogen

NITROGEN MESSAGE{ "ts":"2015-05-20T15:03:48.299Z",

"body":{

"command":{

"on":false }},

"from":"555ca24bf9b56a0100321aae", "type":"_lightState",

"index_until":"2015-05-27T15:03:48.683Z",

"expires":"2500-01-01T00:00:00.000Z",

"tags":["command:555ca24bf9b56a0100321aae"],

"response_to":["555ca2539746460100146efc"],

"ver":0.2, "updated_at":"2015-05-20T15:03:48.683Z",

"created_at":"2015-05-20T15:03:48.683Z",

"id":"555ca254edc0b30100124cee“

}

Page 18: Building IoT Solutions with Nitrogen

DEMO

Implementing Command Manager to Control a Device

Page 19: Building IoT Solutions with Nitrogen
Page 20: Building IoT Solutions with Nitrogen
Page 21: Building IoT Solutions with Nitrogen

CAR CLIENT

type: enginets: 05/03/2014 08:00:24rpms: 23.23fuel: 2.2

type: locationts: 05/03/2014 08:00:23latitude: -33.92253longitude: 18.4239

type: locationts: 05/03/2014 08:00:26latitude: 38.2longitude: 2.2

type: locationts: 05/03/2014 08:00:25latitude: 38.2longitude: 2.2

Nit

rogen

Fro

ntd

oor

MQTTuC

(1

28

KB

, 8

0M

Hz)

3G

Page 22: Building IoT Solutions with Nitrogen

TELEMETRY INGESTION

MQTT AMQP

Authentication and Authorization

Ingestion Service

REST

Device Registry

Data Pipeline

Cars Browsers, MobileServers

Nit

rogen

Serv

ices

Azu

reC

lients

Machine Learning

Page 23: Building IoT Solutions with Nitrogen

NEXT STEPSTutorials/labs at http://ThingLabs.iohttp://Nitrogen.io

[email protected]

@DSeven @ThingLabsIo