50
www.immobilienscout24.de Get the basics right for your IoT business IoT Innovation Lab @ Relayr – 2016-05-04 – Speaker: @KayLerch

IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Embed Size (px)

Citation preview

Page 1: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

www.immobilienscout24.de

Get the basics right for your IoT businessIoT Innovation Lab @ Relayr – 2016-05-04 – Speaker: @KayLerch

Page 2: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Agenda

1.Know the tech stack2.AWS can manage things for you3.AWS is not the only truth4.That’s Apache NiFi5.AWS IoT basic concepts (Recap)6.AWS IoT & Apache NiFi7.Focus on business value8.Focus on innovation

Seite 2Get the basics right for your IoT business | Kay Lerch

Page 3: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Know the tech stackbefore you do business

Seite 3Get the basics right for your IoT business | Kay Lerch

Page 4: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

A reference architecture for IoT

Seite 4Source: WSO2 (IoT Whitepaper)

Value Value

Value

Value

Effort

Effort

Effort

Challenges:• Set the basics right (EFFORT)• Integrate (VALUE) in your current business

/ IT landscape• Be innovative!

Solution:Minimize (EFFORT)• Rely on managed services and toolsMaximize (VALUE)• Have the basics right• rely on established tools• Think over your integration strategyDrive innovation• Think beyond borders• disrupt business with combining

established things in a totally new fashion

Get the basics right for your IoT business | Kay Lerch

Page 5: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS can manage those basicswith a managed IoT solution

Seite 5Get the basics right for your IoT business | Kay Lerch

Page 6: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

What AWS (IoT) provides …

Seite 6

Device Registry

TLS Certificates with associated IAM-like policies

Communication over HTTP and MQTT

Message broker with topicsState persistence with shadows

Event processing and forwarding with IoT Rules and Rule actions

Device SDKs in Node.JS, Cand for Arduino Yún

Get the basics right for your IoT business | Kay Lerch

Page 7: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

What AWS (IoT) provides …

Seite 7

Event processing and analytics with Kinesis Eventstreams, ML, EMR and Lambda

Data / event stores like S3 or Dynamo DB

API Gateway for public endpoint management

Have your IoT related key metrics in CloudWatch

EC2 as a ground for your (web) applications communicating with devices

Get the basics right for your IoT business | Kay Lerch

Page 8: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS IoT core tents

Seite 8

Read this: “Core tenets of IoT” by AWS (as of April 2016)

Get the basics right for your IoT business | Kay Lerch

Page 9: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS is not the only truthYou surely have your lovely tools outside AWS

Seite 9Get the basics right for your IoT business | Kay Lerch

Page 10: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

A brief overview of data processing and analysisThat‘s quite a lot of tooling and technology …

Seite 10

Hidden complexities

Data Producers

Data Consumers

EventBroker

(Big) data stores

Data analysis challenges (Realtime) Data Processing & AnalyticsIntegrationchallengesIn

gest

ion

chal

leng

es

Data security challenges

Get the basics right for your IoT business | Kay Lerch

Page 11: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

A brief overview of data processing and analysisThat‘s quite a lot of tooling and technology …

Seite 11

Hidden complexities

Data Producers

Data Consumers

EventBroker

(Big) data stores

Data analysis challenges (Realtime) Data Processing & AnalyticsIntegrationchallengesIn

gest

ion

chal

leng

es

Data security challenges

Get the basics right for your IoT business | Kay Lerch

If you want …

a (realtime) big picture of your dataflows an option to overlook lineage of each data element have the flexibility to change things on the fly prioritize data overcome challenges of integrating the variety of

technologies with one overarching solution enforce security and compliance along dataflows rely on extensibility driven by OS community satisfy all those needs and keep your tools get rid of only those tools focused on moving data without

making concessions to overall performance

… then you might love:

Page 12: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Just to let you know …

Seite 12Source: WSO2 (IoT Whitepaper)

Value Value

Value

Value

Effort

Effort

Effort

We are here

And a bit of here

Get the basics right for your IoT business | Kay Lerch

Page 13: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

That’s Apache NiFi

Seite 13Get the basics right for your IoT business | Kay Lerch

Page 14: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 14

That‘s Apache NiFiin one page

Apache nifi supports powerful and scalable directed graphs of datarouting, transformation, and system mediation logic.Web-based user interfaceSeamless experience between design, control, feedback, and monitoringHighly configurableLoss tolerant vs guaranteed delivery, Low latency vs high throughput, Dynamic prioritization, Flow can be modified at runtime, Back pressureData ProvenanceTrack dataflow from beginning to endDesigned for extensionBuild your own processors and more, Enables rapid development and effective testingSecureSSL, SSH, HTTPS, encrypted content, etc..., Pluggable role-based authentication/authorization

Source: https://nifi.apache.org/ Get the basics right for your IoT business | Kay Lerch

Page 15: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 15

That‘s Apache NiFiin real and feel

Go to NiFi’s interface and understand:

Processors

Templates

Concept of back pressure

Concept of data prioritization

Provenence Graph

Get the basics right for your IoT business | Kay Lerch

Page 16: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

NiFi Cluster

NiFi Cluster Manager (NCM)

JVM

Node (Primary)

NiFi Clustered Architecture

JVM

WebserverProvenanceRepository

ContentRepository

FlowfileRepository

REST-APIAdminUI

Webserver REST-APIAdmin UI

Flow Controller

Cluster Manager

Processor 1Processor 2

Isolated Processor

Controller Service 1Controller Service 2Controller Service n

Hear

tbea

t

Lead

er

elec

tion

Repo

rt ch

ange

Embedded Apache Zookeeper

Node (Slave)JVM

WebserverProvenanceRepository

ContentRepository

FlowfileRepository

REST-APIAdminUI

Flow ControllerProcessor 1Processor 2

Isolated Processor

Controller Service 1Controller Service 2Controller Service n

Hear

tbea

t

Repo

rt ch

ange

Sync

St

ate

Sync

St

ate

Page 17: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS IoTBasics (Recap)

Seite 17Get the basics right for your IoT business | Kay Lerch

Page 18: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 18

AWS IoTThe Shadow

AWS IoT

Thing

Thing Shadow

Rule

Reports State Mirrors State in Shadow

Gets reported state or sets desired state

Propagates desired state

Receives desired state

Fulfi

lls

desir

ed st

ate

Subscribes to particular messages

AWS Services

Some AWS Resource

Routesmessage

TLS1.2

TLS 1.2 Policy

Get the basics right for your IoT business | Kay Lerch

Page 19: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS IoTMQTT topics

AWS IoT

Thing Shadow

get

get/accepted

get/rejected

Request state

Get shadow state

Get error

update

update/accepted

update/rejected

update/delta

Update state

Confirmation

Get error

Changedstate

1

2

1

2

3

Thing topics name pattern: $aws/things/thing_name/...

Get the basics right for your IoT business | Kay Lerch

Page 20: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Apache NiFi & AWS IoTNew processors

Seite 20Get the basics right for your IoT business | Kay Lerch

Page 21: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 21

Apache NiFi & AWS IoTGetIOTMqtt – a MQTT client

AWS IoT

Thing Shadow

updateUpdate state

Establish Connection

Subscribe

Receive state

1

2

3

Flowfile

Get the basics right for your IoT business | Kay Lerch

Page 22: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 22

Apache NiFi & AWS IoTGetIOTMqtt – Configuration

Get the basics right for your IoT business | Kay Lerch

Page 23: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 23

Apache NiFi & AWS IoTGetIOTMqtt – Live demo

Get the basics right for your IoT business | Kay Lerch

Page 24: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 24

Apache NiFi & AWS IoTGetIOTMqtt – Live demo

Get the basics right for your IoT business | Kay Lerch

Page 25: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 25

Apache NiFi & AWS IoTPutIOTMqtt – instruct a „thing“ (but bypass the shadow)

AWS IoT

Thing Shadow

update / delta

Update state

Establish Connection

Publish state

1

2 Flowfile

Flowfile

Get the basics right for your IoT business | Kay Lerch

Page 26: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 26

Apache NiFi & AWS IoTPutIOTMqtt – Configuration

Get the basics right for your IoT business | Kay Lerch

Page 27: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 27

Apache NiFi & AWS IoTPutIOTMqtt – Live demo

Get the basics right for your IoT business | Kay Lerch

Page 28: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 28

Apache NiFi & AWS IoTGetIOTShadow – constantly check last reported state

AWS IoT

Thing Shadow

updateReport state

RequestShadow

Flowfile

Flowfile

Get the basics right for your IoT business | Kay Lerch

Page 29: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 29

Apache NiFi & AWS IoTGetIOTShadow – Configuration

Get the basics right for your IoT business | Kay Lerch

Page 30: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 30

Apache NiFi & AWS IoTPutIOTShadow – instruct a „thing“ over its shadow

AWS IoT

Thing Shadow

update / delta

Desire state

UpdateShadow

Flowfile

Flowfile

Get the basics right for your IoT business | Kay Lerch

Page 31: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Seite 31

Apache NiFi & AWS IoTPutIOTShadow – Configuration

Get the basics right for your IoT business | Kay Lerch

Page 32: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

We got the basicsLet’s focus on business value

Seite 32Get the basics right for your IoT business | Kay Lerch

Page 33: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Homework almost done

Seite 33Source: WSO2 (IoT Whitepaper)

Value Value

Value

Value

Effort

Effort

Effort

Challenges:• Set the basics right (EFFORT)• Integrate (VALUE) in your current business• Be innovative!

Solution:Minimize (EFFORT) Rely on managed services and toolsMaximize (VALUE) Have the basics right rely on established tools• Think over your integration strategyDrive innovation• Think beyond borders• disrupt business with combining

established things in a totally new fashion

Get the basics right for your IoT business | Kay Lerch

Page 34: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Agile integration strategy with AWS Simple Workflows at ImmobilienScout

Legacy / 3rd Party

AWS Simple Workflows (SWF)

AWS

SNS

AWSLambda

AWS

S3

AWS

EC2

AWS

ECS

OnPr

emise

Brok

er

Start Workflow

Put File

Bucket Topic

PublishMessage

Start Workflow

ActivityTask

Function

Function

Trusted Applications / Mobile Apps AWS Flow Framework

Start Workflow

EventTrigger

Send DataInvoke Service

DeciderAppsAW

S Cl

oudw

atc

h

AWS

Clou

dTra

il Logs

Metrics

Alarms

Log Measure

Activity Task

Activity Task

Decision Task

Decision Task

Workflow History

AWS Flow Framework

AWS

***

Any

ActivityTask

DecisionTask

Start Workflow

Trigger Trigger

Notify

APICall

Discover

Decision Task

ServiceApps

AWS Flow Framework

ActivityTask

AWS

IAM

Policies

Manage Permissions

Function

LambdaTask

APICall

IoT Device

AWS

IoT

Topic

PublishMessage

Function

Start Workflow

Rule

Dyna

mo

Start Workflow

Put File

Table

Function

Trigger

Partner

AWS

API

Gate

way

StartWorkflow

Invoke

Function

Route

Service

Lambda Task Decision

Task

Page 35: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Hybrid integration platform aiming for Self-Service integration

Page 36: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

We got the basicsLet’s focus on innovation

Seite 36Get the basics right for your IoT business | Kay Lerch

Page 37: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Homework done!

Seite 37Source: WSO2 (IoT Whitepaper)

Value Value

Value

Value

Effort

Effort

Effort

Challenges:• Set the basics right (EFFORT)• Integrate (VALUE) in your current business• Be innovative!

Solution:Minimize (EFFORT) Rely on managed services and toolsMaximize (VALUE) Have the basics right rely on established tools Think over your integration strategyDrive innovation• Think beyond borders• disrupt business with combining

established things in a totally new fashion

Get the basics right for your IoT business | Kay Lerch

Page 38: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Gain real business value

Seite 38Source: WSO2 (IoT Whitepaper)

Value Value

Value

Value

Effort

Effort

Effort

1) Combine values of different worlds to find a breathtaking use case

2) Rely on your basics

3) Build a product around your solution

4) Change the world

Value Value+

Effort Effort Effort+ +

+

=

+

Adopt new things…

Get the basics right for your IoT business | Kay Lerch

Page 39: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Gain valueDemo (Smart home)

Seite 39

+ +

Get the basics right for your IoT business | Kay Lerch

Pick some fancy frontend (VALUE) Pick some fancy “backend” (VALUE)

Rely on your basics (EFFORT)

= HaveSmart Home

Page 40: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Gain valueDemo (VoiceOps)

Seite 40

+ +

Get the basics right for your IoT business | Kay Lerch

Pick some fancy frontend (VALUE) Pick some fancy “backend” (VALUE)

Rely on your basics (EFFORT)

= HaveVoiceOps

Page 41: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Once you got the basics right, it’s up to you to …

Seite 41Get the basics right for your IoT business | Kay Lerch

Page 42: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

www.immobilienscout24.de

Thanks for you attention. Any questions?Contact:Immobilien Scout GmbHAndreasstraße 1010243 Berlin

Kay LerchFon +49 30 24 301-1149

[email protected]

Page 43: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Backup

Seite 43Get the basics right for your IoT business | Kay Lerch

Page 44: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

T-Cobbler

I need some “thing” …

Page 45: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Input & Output units on your breadboard

I need some “thing” …

Page 46: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Control GPIO-Pins with sending or receiving electric impulses

Control an output Control an input

Page 47: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Communicating with AWS IoT over MQTT topics

Page 48: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Alexa Skill AWS Lambda

AWS API Gateway

LambdaPost

Message to Slack

LambdaUpdate Shadow

Rpi 2

AWS IoT

Thing Shadow

Python ScriptGPIO

Rule

Invoke

MQTTPublish

MQTT Receive

Update Shadow on state change

Impulse Sequence

SVC

OutgoingWebhook

Post Message over Slack Web API

433 Mhz Signal

C++ D/AConverter

Post Message if no state changes

Page 49: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

AWS Lambda

AWS EC2

LambdaStart / Stop

EC2-Instance

Rpi 2

AWS IoT

Thing Shadow

Python ScriptGPIO

Rule

Invoke

MQTTPublish

Impulse Sequence

Post Message over Slack Web API

433 Mhz Signal

C++ A/DConverter

Start / Stop over AWS SDK

AWS CW

LambdaReact on EC2 state change

Rule

Update Shadow

MQTT Receive

Impulse

On state change

Page 50: IoT Innovation Lab Berlin @relayr - Kay Lerch on Getting basics right for your IoT business (2016-05-04)

Rpi 2

AWS IoT

Thing Shadow

Python ScriptGPIO

Rule

MQTTPublish

Impulse Sequence

Post Message over Slack Web API

AWS CWAlarmOn Humidity > 30%Metric Metric

Alexa Skill

Read out temperature and humidity