IoT at Scale or, "From Little Things, Big Data Grow" - - PowerPoint PPT Presentation

iot at scale
SMART_READER_LITE
LIVE PREVIEW

IoT at Scale or, "From Little Things, Big Data Grow" - - PowerPoint PPT Presentation

Christopher Biggs IoT at Scale @unixbigot @accelerando_au IoT at Scale or, "From Little Things, Big Data Grow" Christopher Biggs, Accelerando Consulting @unixbigot @accelerando_au #YOWData Sept 2017 1 / 74 Christopher Biggs


slide-1
SLIDE 1

IoT at Scale

  • r, "From Little Things, Big Data Grow"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Christopher Biggs, Accelerando Consulting @unixbigot @accelerando_au

1 / 74

slide-2
SLIDE 2

Who am I?

Christopher Biggs — @unixbigot — @accelerando_au

▷ Brisbane, Australia ▷ 20+ years in IT as developer, architect, manager ▷ Founder, Accelerando Consulting ▷ Accelerando is a "full service" consultancy - chips to cloud ▷ IoT, DevOps, Big † Data

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude

† Actual bigness may vary

2 / 74

slide-3
SLIDE 3

From little Things, Big Data Grow

"Internet of Things" (IoT) At Scale

▷ Why Even IoT? - my personal motivation ▷ Chips to Cloud - the journey from sensor to senses ▷ The Air Gap - connecting wireless devices to the Internet ▷ Data Tributaries - follow the data from droplet to ocean ▷ Making sense of it all - Managing and visualising IoT data

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude

3 / 74

slide-4
SLIDE 4

Overture: Why Even IoT?

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

4 / 74

slide-5
SLIDE 5

"Don't ever invite a vampire into your house, you silly boy. It renders you powerless."

  • - "Max", The Lost Boys

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

5 / 74

slide-6
SLIDE 6

"The 'S' in IoT stands for 'Security'."

  • - Absolutely Everyone, The Internet

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

6 / 74

slide-7
SLIDE 7

What is IoT For?

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

7 / 74

slide-8
SLIDE 8

It's for not this

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

Prelude Overture

slide-9
SLIDE 9

People who shouldn't have to do crummy jobs:

Children

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

9 / 74

slide-10
SLIDE 10

People who shouldn't have to do crummy jobs:

People of Colour

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

10 / 74

slide-11
SLIDE 11

People who shouldn't have to do crummy jobs:

Women

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

11 / 74

slide-12
SLIDE 12

People who shouldn't have to do crummy jobs:

Immigrants

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

12 / 74

slide-13
SLIDE 13

People who shouldn't have to do crummy jobs:

Foreigners

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

13 / 74

slide-14
SLIDE 14

People who shouldn't have to do crummy jobs:

Robots

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

14 / 74

slide-15
SLIDE 15

Wait, what?

"Aren't crummy jobs what robots are for?"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

15 / 74

slide-16
SLIDE 16

"Do you want a war of extinction? Because that's how you get wars of extinction"

  • -Malory Archer, nearly

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

16 / 74

slide-17
SLIDE 17

Articial nonintelligence

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

17 / 74

slide-18
SLIDE 18

Doing all the things no intelligent being should have to be bothered by.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

18 / 74

slide-19
SLIDE 19

Give me your tired-of-doing-that, your poorly done jobs, your harried masses yearning to be stress-free

  • - Emma Lazarus, kind of

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

19 / 74

slide-20
SLIDE 20

IoT's Trinity

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

20 / 74

slide-21
SLIDE 21

Things

Start with the simplest parts...

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

21 / 74

slide-22
SLIDE 22

Internet

...connect them together...

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

22 / 74

slide-23
SLIDE 23

Of (i.e. context)

...to form a synergystic whole.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

23 / 74

slide-24
SLIDE 24

My Three Laws of IoT

▷ Devices must cooperate for the benet of humans ▷ Devices must communicate, and obey instructions ▷ Devices must be as simple and reliable as possible

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

24 / 74

slide-25
SLIDE 25

OK, end of setup

  • - "Ford Fairlane", (not just a car, but a really awful movie)

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture

25 / 74

slide-26
SLIDE 26

Communications

Crossing the Air Gap

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

26 / 74

slide-27
SLIDE 27

Fast, Cheap, Battery-efcient.

Choose any two.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

27 / 74

slide-28
SLIDE 28

PoE (Power-over-Ethernet)

Fast, no-battery, expensive wires.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

28 / 74

slide-29
SLIDE 29

EoP (Ethernet over Powerline)

Cheaper wiring, not so fast.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

29 / 74

slide-30
SLIDE 30

PoDS (Plain ol' Dumb Serial)

Please, no.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

30 / 74

slide-31
SLIDE 31

WiFi

(Wireless Made-up-Acronym)

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

31 / 74

slide-32
SLIDE 32

Bluetooth

(Don't chew on that Biro)

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

32 / 74

slide-33
SLIDE 33

ETPH

You know, telephones

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

33 / 74

slide-34
SLIDE 34

LoRa

Telephones from 1978, but without the wires.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

34 / 74

slide-35
SLIDE 35

IPoSUV

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

35 / 74

slide-36
SLIDE 36

Comms Recap

▷ If you have wires, use 'em ▷ PoDS is not IoT ▷ If you have the power budget for WiFi, great ▷ How about a bluetooth mesh? ▷ "Low-power" equals "really bloody slow"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications

36 / 74

slide-37
SLIDE 37

Structuring for Scalability

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

37 / 74

slide-38
SLIDE 38

Insert magic cloud here

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

38 / 74

slide-39
SLIDE 39

Nope

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

39 / 74

slide-40
SLIDE 40

Edge Computing

aka "Not the cloud but we've spent so long plugging cloud we can't possibly admit that"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

40 / 74

slide-41
SLIDE 41

Web API

HTTP is awful on slow links

HTTPs is aw-overowing

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

41 / 74

slide-42
SLIDE 42

Message buses

long-lived connection, lightweight messages

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

42 / 74

slide-43
SLIDE 43

Retrot

Websockets

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

43 / 74

slide-44
SLIDE 44

Build your own

A bit of orchestration, a bit of docker, a bit of time

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

44 / 74

slide-45
SLIDE 45

Owning an architecture is a big responsibility

Maybe you should start with a puppy.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

45 / 74

slide-46
SLIDE 46

Don't build your own

Oh, look, google, amazon and microsoft already did it

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

46 / 74

slide-47
SLIDE 47

Well, they announced it

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

47 / 74

slide-48
SLIDE 48

Microsoft

Messaging in place, provisioning "coming soon"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

48 / 74

slide-49
SLIDE 49

Google

Messaging in place, management in private beta Device platform (Android Things) supports two vendors only.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

49 / 74

slide-50
SLIDE 50

Amazon

Messaging, device management function-provisioning in place. No news on device provisioning.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

50 / 74

slide-51
SLIDE 51

So, tell me again about rolling my own?

(I'll tell you on Thursday)

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

51 / 74

slide-52
SLIDE 52

Give me a hint?

  • Saltstack. Mosquitto. Docker.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

52 / 74

slide-53
SLIDE 53

Leveraging saltstack

▷ ZeroMQ message bus transport ▷ Tree-structured hierarchy ▷ Top level master (or multiple) ▷ Intermediate "syndicate masters" (optional) ▷ Leaf-node "minions"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

53 / 74

slide-54
SLIDE 54

Playing nice with MQTT

▷ Message broker federation (one- or two-way) ▷ Lots of implementations ▷ Mosquitto in Docker

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

54 / 74

slide-55
SLIDE 55

What do you mean you want it reliable?

▷ MQTT QoS options (but not end-to-end) ▷ Apache Kafka ▷ Amazon Kinesis

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability

55 / 74

slide-56
SLIDE 56

Case study 1 - MQTT and Kinesis

▷ Sensors transmit to on-site MQTT broker ▷ Cloud MQTT broker federates on-site brokers ▷ Cloud ingester writes to Elasticsearch ▷ Cloud ingester forwards certain events to kinesis stream ▷ AWS Lambda functions handle kinesis event ▷ Problems: no recovery of missed messages

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude

56 / 74

slide-57
SLIDE 57

Case study 2 - Saltstack and Elasticsearch (eetvalid.com)

▷ Sensors connect to on-site saltstack gateway ▷ (Potential store-and-forward for disconnected sensor stations) ▷ Saltstack gateway connects to cloud 'master' ▷ Event 'engine' on master relays events to Elasticsearch data store

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude

57 / 74

slide-58
SLIDE 58

Case study 3 - Meshes and AWS IoT (evacmate.com.au)

▷ Sensors create a mesh network over bluetooth ▷ One or more gateway nodes have 3G uplinks ▷ Data streamed to cloud over websocket ▷ Gateway nodes managed with AWS IoT

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude

58 / 74

slide-59
SLIDE 59

Making sense of data

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

59 / 74

slide-60
SLIDE 60

Layers of data

▷ Device health ▷ Population health ▷ Application data

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

60 / 74

slide-61
SLIDE 61

Put it all in a data bucket

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

61 / 74

slide-62
SLIDE 62

But don't look at it

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

62 / 74

slide-63
SLIDE 63

Except when you do

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

63 / 74

slide-64
SLIDE 64

Articial nonintelligence

Machine learning for "this is ne"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

64 / 74

slide-65
SLIDE 65

Machine Learning in Elastic Search

"this is not ne for 10am on Tuesday"

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation

65 / 74

slide-66
SLIDE 66

Managing your things

Big data bassackwards

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

66 / 74

slide-67
SLIDE 67

Addressing the eet

Saltstack - rich syntax for addressing sets of devices

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction

67 / 74

slide-68
SLIDE 68

Addressing the eet

MQTT comms - bidirectional messaging but little structure

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction

68 / 74

slide-69
SLIDE 69

Addressing the eet

Broadcasts - IP or otherwise

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction

69 / 74

slide-70
SLIDE 70

Reactive architectures

Rule based response to events.

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction

70 / 74

slide-71
SLIDE 71

Coda

▷ IoT (for me) is about relieving Future Shock ▷ IoT's trinity: Hardware, Comms, Data ▷ Crossing the Air Gap ▷ Flowing to the sea ▷ Case studies ▷ Making sense of it all ▷ Knowing when to run

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction Coda

71 / 74

slide-72
SLIDE 72

Homework

▷ Make your systems amenable to cooperation ▷ Try out Amazon GreenGrass - lambda functions on your Raspberry Pi ▷ Keep an eye on beta offerings from Google and Microsoft. ▷ Use a message fabric to instrument your distributed systems ▷ Try out Elastic or Google ML for anomaly detection ▷ What cool things can you do with LoRa and 300bits per second?

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction Coda

72 / 74

slide-73
SLIDE 73

Resources, Questions

Related talks - http://christopher.biggs.id.au/#talks Me - Christopher Biggs

▷ Twitter: @unixbigot ▷ Email: christopher@biggs.id.au ▷ Slides, and getting my advice: http://christopher.biggs.id.au/ ▷ Accelerando Consulting - IoT, DevOps, Big Data - https://accelerando.com.au/

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction Coda

73 / 74

slide-74
SLIDE 74

Links

▷ Open source Bluetooth Mesh on current hardware ▷ Future Standard Bluetooth mesh networksing ▷ Public access LoRaWAN in Sydney ▷ The 'mosquitto' MQTT broker: ▷ Example of how I use SaltStack to provision MQTT ▷ Asynchronous Microservices

Christopher Biggs — IoT at Scale @unixbigot @accelerando_au

#YOWData Sept 2017

Prelude Overture Communications Scalability Interlude Interpretation Reaction Coda

74 / 74