58
Architecting the Internet of Things @blimpyacht

Webinar: Architecting the Internet of Things

  • Upload
    mongodb

  • View
    1.326

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Webinar: Architecting the Internet of Things

Architecting theInternet of Things@blimpyacht

Page 2: Webinar: Architecting the Internet of Things
Page 3: Webinar: Architecting the Internet of Things
Page 4: Webinar: Architecting the Internet of Things

4

Page 5: Webinar: Architecting the Internet of Things

Maryln

Lorri

Lindsay

JonathonChris

Page 6: Webinar: Architecting the Internet of Things

Maryln

Lorri

Lindsay

Recommendation

Page 7: Webinar: Architecting the Internet of Things

Data Strategy

Page 8: Webinar: Architecting the Internet of Things

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 : Helicopterengine : {

type : "turboshaft"layout : "axial”,massflow : 1318

},Blades : 4undercarriage : "fixed"

}

Page 9: Webinar: Architecting the Internet of Things

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 : Helicopterengine : {

type : "turboshaft"layout : "axial”,massflow : 1318

},Blades : 4undercarriage : "fixed"

}

Page 10: Webinar: Architecting the Internet of Things

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 : Helicopterengine : {

type : "turboshaft"layout : "axial”,massflow : 1318

},Blades : 4undercarriage : "fixed"

}

Page 11: Webinar: Architecting the Internet of Things

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 12: Webinar: Architecting the Internet of Things

Event Sourcing

Page 13: Webinar: Architecting the Internet of Things

Event Sourcing

State

Page 14: Webinar: Architecting the Internet of Things

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

Event Sourcing

Page 15: Webinar: Architecting the Internet of Things

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

t(5) = 10

Event Sourcing

Page 16: Webinar: Architecting the Internet of Things

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

t(9) = 12

Event Sourcing

Page 17: Webinar: Architecting the Internet of Things

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

Event Sourcing

a = f ’(x)

Page 18: Webinar: Architecting the Internet of Things

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

t(4) = 14

Event Sourcing

t(8) = 10

t(12) = 9

Page 19: Webinar: Architecting the Internet of Things

+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 20: Webinar: Architecting the Internet of Things
Page 21: Webinar: Architecting the Internet of Things

Schema { _id: "abboip|1213084687000", taxi: "abboip", loc: {

geometry: [ -122.39488, 37.75134

] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z")}

Page 22: Webinar: Architecting the Internet of Things

Schema { _id: "abboip|1213084687000", taxi: "abboip", loc: {

geometry: [ -122.39488, 37.75134

] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z")}

Page 23: Webinar: Architecting the Internet of Things

{ _id: "abboip|1213084687000", taxi: "abboip", loc: {

geometry: [ -122.39488, 37.75134

] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z")}

SchemaPrimary Key

Page 24: Webinar: Architecting the Internet of Things

Schema

GEOJSON

{ _id: "abboip|1213084687000", taxi: "abboip", loc: {

geometry: [ -122.39488, 37.75134

] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z")}

Page 25: Webinar: Architecting the Internet of Things

Schema

Occupancy

{ _id: "abboip|1213084687000", taxi: "abboip", loc: {

geometry: [ -122.39488, 37.75134

] }, fare: 0, ts: ISODate("2008-06-10T07:58:07Z")}

Page 26: Webinar: Architecting the Internet of Things

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 27: Webinar: Architecting the Internet of Things
Page 28: Webinar: Architecting the Internet of Things

{ _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 29: Webinar: Architecting the Internet of Things
Page 30: Webinar: Architecting the Internet of Things
Page 31: Webinar: Architecting the Internet of Things

{ "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 32: Webinar: Architecting the Internet of Things

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

Page 33: Webinar: Architecting the Internet of Things

ingest Primary

view

Variant Read Models: VIEWS

viewviewviewview

Page 34: Webinar: Architecting the Internet of Things

Primaryingest

viewviewviewviewview

Page 35: Webinar: Architecting the Internet of Things

Command Query Responsibility Segregation CQRS

WRITE Primary

READREADREADREADREAD

Page 36: Webinar: Architecting the Internet of Things

CQRS

2ndary

WRITE

READ 2ndary

Primary

READ

Page 37: Webinar: Architecting the Internet of Things

Where it Gets Tricky

Page 38: Webinar: Architecting the Internet of Things
Page 39: Webinar: Architecting the Internet of Things
Page 40: Webinar: Architecting the Internet of Things
Page 41: Webinar: Architecting the Internet of Things

{ 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 42: Webinar: Architecting the Internet of Things

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

Notification

Subscriber

Page 43: Webinar: Architecting the Internet of Things
Page 44: Webinar: Architecting the Internet of Things
Page 45: Webinar: Architecting the Internet of Things

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

Notification

Subscriber

Page 46: Webinar: Architecting the Internet of Things

Gaining Insight

Page 47: Webinar: Architecting the Internet of Things
Page 48: Webinar: Architecting the Internet of Things
Page 49: Webinar: Architecting the Internet of Things
Page 50: Webinar: Architecting the Internet of Things

Data Processing

Page 51: Webinar: Architecting the Internet of Things

HDFS

Stand AloneYARN

SparkHadoopMesos

Hive

Pig

SparkSQL

SparkShell

SparkStreaming

Page 52: Webinar: Architecting the Internet of Things

HDFS

Stand AloneYARN

SparkHadoopMesos

Hive

Pig

SparkSQL

SparkShell

SparkStreaming

Page 53: Webinar: Architecting the Internet of Things

Data ServicesHDFS

HDFS

HDFS

HDFS

HDFS

Page 54: Webinar: Architecting the Internet of Things

HDFS

Stand AloneYARN

SparkHadoopMesos

Hive

Pig

SparkSQL

SparkShell

SparkStreaming

Page 55: Webinar: Architecting the Internet of Things

Stand AloneYARN

SparkHadoopMesos

Hive

Pig

SparkSQL

SparkShell

SparkStreaming

Page 56: Webinar: Architecting the Internet of Things

Data Services

MapReduce

Page 57: Webinar: Architecting the Internet of Things
Page 58: Webinar: Architecting the Internet of Things

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.