architecting the internet of things - scale · 2016-01-25 · internet of things @blimpyacht . 6 ....

65
Architecting the Internet of Things @blimpyacht

Upload: others

Post on 28-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Architecting the Internet of Things @blimpyacht

Page 2: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 3: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 4: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 5: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 6: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

6

Page 7: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Leslie

Norman

Veronica

Jonathon

Chris

Page 8: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

High Level Architecture

Data Services

Page 9: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Data Strategy

Page 10: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Flexible Schemas

{ maker : "M.V. Agusta", type : sportsbike, engine : { type : ”internal combustion", cylinders: 4, displacement : 750 }, rake : 7, trail : 3.93 } { maker : "M.V. Agusta", type : Helicopter engine : { type : "turboshaft" layout : "axial”, massflow : 1318 }, Blades : 4 undercarriage : "fixed" }

Page 11: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Flexible Schemas

Discriminator column

{ maker : "M.V. Agusta", type : sportsbike, engine : { type : ”internal combustion", cylinders: 4, displacement : 750 }, rake : 7, trail : 3.93 } { maker : "M.V. Agusta", type : Helicopter engine : { type : "turboshaft" layout : "axial”, massflow : 1318 }, Blades : 4 undercarriage : "fixed" }

Page 12: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Flexible Schemas

Shared indexing strategy

{ maker : "M.V. Agusta", type : sportsbike, engine : { type : ”internal combustion", cylinders: 4, displacement : 750 }, rake : 7, trail : 3.93 } { maker : "M.V. Agusta", type : Helicopter engine : { type : "turboshaft" layout : "axial”, massflow : 1318 }, Blades : 4 undercarriage : "fixed" }

Page 13: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Flexible Schemas

Polymorphic Attributes

{ maker : "M.V. Agusta", type : sportsbike, engine : { type : ”internal combustion", cylinders: 4, displacement : 750 }, rake : 7, trail : 3.93 } { maker : "M.V. Agusta", type : Helicopter, engine : { type : "turboshaft”, layout : "axial”, massflow : 1318 }, Blades : 4, undercarriage : "fixed" }

Page 14: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Event Sourcing

Page 15: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Event Sourcing

State

Page 16: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5 t(12) = 9

Event Sourcing

Page 17: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

t(5) = 10

Event Sourcing

Page 18: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

t(9) = 12

Event Sourcing

Page 19: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

Event Sourcing

a = f ’(x)

Page 20: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

t(4) = 14

Event Sourcing

t(8) = 10

t(12) = 9

Page 21: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

+4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

t(4) = 14

Event Sourcing

t(8) = 10

t(12) = 9

t’(4) = -2

t’(8) = -17

t’(12) = -22

Page 22: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 23: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Schema { _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Page 24: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Schema { _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Page 25: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

{ _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Schema Primary Key

Page 26: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Schema

GEOJSON

{ _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Page 27: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Schema

Occupancy

{ _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Page 28: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Schema

Timestamp

"abboip|1213084687000"

{ _id: "abboip|1213084687000", taxi: "abboip", loc: { geometry: [ -122.39488, 37.75134 ] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z") }

Page 29: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 30: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

{ _id: ObjectId("56a4215a46778b69e08ff8ff"), taxi: "abboip", start: ISODate("2008-05-17T14:51:10Z"), route: { type: "LineString", coordinates: [ [ -122.39724, 37.74977 ], [ -122.40619, 37.74896 ], [ -122.41335, 37.74831 ], [ -122.414, 37.75157 ], [ -122.41438, 37.75552 ] ] }, end: ISODate("2008-05-17T14:55:58Z") }

Page 31: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 32: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 33: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

{ "type": "Polygon", "coordinates" : [ [ [ -73.969581, 40.760331 ], [ -73.974487, 40.762245 ], [ -73.977692, 40.763598], [ -73.979508, 40.761269 ], [ -73.982364, 40.762358 ], [ -73.983692, 40.760497 ], [ -73.972821, 40.755861 ], [ -73.969581, 40.760331 ] ] ] }

Page 34: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

{ $geoIntersects: { $geometry: { "type": "Point", "coordinates": [ -73.975010, 40.760071 ] }}}

Page 35: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

ingest Primary

view

Variant Read Models: VIEWS

view

view

view

view

Page 36: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Primary ingest

view

view

view

view

view

Page 37: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Command Query Responsibility Segregation CQRS

WRITE Primary

READ

READ

READ

READ

READ

Page 38: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

CQRS

2ndary

WRITE

READ 2ndary

Primary

READ

Page 39: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Where it Gets Tricky

Page 40: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 41: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 42: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Agent

Federated Configuration Management

Database

Service Management System

Agent Agent Agent Agent

Page 43: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 44: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 45: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 46: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 47: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

{ sys: "fp&l", transformer: 93035, component: "CENTRON C1S Single Phase", version: "v2.9.2", alerts: [ { treshold: { k: 'temp', v: '120' }, action: { summary: "device overheating", api: "https://bugzilla.mozilla.org/rest/bug" op_sys: "All", priority: "P1" } } ] }

Page 48: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

External Updates +4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

Notification

Subscriber

Page 49: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 50: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 51: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

External Updates +4 -2 +5 +7 -4 +9 -3 -6 +2 +1 +1 -5

Notification

Subscriber

Page 52: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Gaining Insight

Page 53: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 54: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 55: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 56: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Data Processing

Page 57: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

HDFS

Stand Alone YARN

Spark Hadoop

Mesos

Hive

Pig

Spark SQL

Spark Shell

Spark Streaming

Page 58: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

HDFS

Stand Alone YARN

Spark Hadoop

Mesos

Hive

Pig

Spark SQL

Spark Shell

Spark Streaming

Page 59: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Data Services

HDFS

HDFS

HDFS

HDFS

HDFS

Page 60: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

HDFS

Stand Alone YARN

Spark Hadoop

Mesos

Hive

Pig

Spark SQL

Spark Shell

Spark Streaming

Page 61: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Stand Alone YARN

Spark Hadoop

Mesos

Hive

Pig

Spark SQL

Spark Shell

Spark Streaming

Page 62: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Data Services

MapReduce

Page 63: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

https://github.com/mongodb/mongo-hadoop

Page 64: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services
Page 65: Architecting the Internet of Things - SCALE · 2016-01-25 · Internet of Things @blimpyacht . 6 . Leslie Norman Veronica Jonathon Chris . High Level Architecture Data Services

Thank You @blimpyacht

[email protected]

Michal Piorkowski, Natasa Sarafijanovic-Djukic, Matthias Grossglauser, CRAWDAD dataset epfl/mobility (v. 2009-02-24), traceset: cab,

downloaded from http://crawdad.org/epfl/mobility/20090224/cab, doi:10.15783/C7J010, Feb 2009.