Top Banner
Building IoT Apps with Vortex and the Intel Edison Starter Kit Angelo Corsaro, PhD Chief Technology Officer [email protected]
74

Building IoT Applications with Vortex and the Intel Edison Starter Kit

Jan 14, 2017

Download

Technology

Angelo Corsaro
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 Applications with Vortex and the Intel Edison Starter Kit

Building IoT Apps with Vortex and the Intel Edison Starter Kit

AngeloCorsaro,PhDChiefTechnologyOfficer

[email protected]

Page 2: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryIoT Architectures

Page 3: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Page 4: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Cloud

Cloud Centric Architectures

Page 5: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Cloud

FogFog

Fog

Fog

Page 6: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Page 7: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryVortex Intro

Page 8: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

Vortex is a standard technology for efficient, ubiquitous, interoperable, secure and platform independent data sharing across network connected devices

in151 Characters

Page 9: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Applications can autonomously and asynchronously read and write data enjoying spatial and

temporal decoupling DDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

Virtualised Data Space

Page 10: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Temporal DecouplingFour different levels of temporal decoupling allow to control the trade-off between full temporal decoupling, performances and

resource usage

tSource

t

t

Sink

Sink

Volatile Durability

tSource

t

t

Sink

Sink

Transient Durability

Page 11: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Built-in dynamic discovery isolates applications from

network topology and connectivity details

DDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

Dynamic Discovery

Page 12: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Failure DetectionVortex provides mechanism for

detecting traditional crashes as well as performance failures

Source

tSink

Fault Notification

TD

Source

tSink

Performance Failure Notification

P

t

P P

Page 13: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Fault MaskingA built-in fault-masking

mechanism transparently controls and switches between

sources of data

Source

tSink

Source t

Page 14: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Fault MaskingVortex provides mechanism for

detecting traditional crashes as well as performance failures

Source

tSink

Source t

Page 15: Building IoT Applications with Vortex and the Intel Edison Starter Kit

QoS policies allow to express temporal and availability

constraints for data

DDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

QoS - Enabled

Page 16: Building IoT Applications with Vortex and the Intel Edison Starter Kit

A collection of policies that control non-

functional properties such as reliability,

persistence, temporal constraints and priority

QoS

HISTORY

LIFESPAN

DURABILITY

DEADLINE

LATENCY BUDGET

TRANSPORT PRIO

TIME-BASED FILTER

RESOURCE LIMITS

USER DATA

TOPIC DATA

GROUP DATA

OWENERSHIP

OWN. STRENGTH

LIVELINESS

ENTITY FACTORY

DW LIFECYCLE

DR LIFECYCLE

PRESENTATION

RELIABILITY

PARTITION

DEST. ORDER

RxO QoS Local QoS

Page 17: Building IoT Applications with Vortex and the Intel Edison Starter Kit

QoS Policies controlling end-to-end properties

follow a Request vs. Offered

QoS Domain

Participant

DURABILITY

OWENERSHIP

DEADLINE

LATENCY BUDGET

LIVELINESS

RELIABILITY

DEST. ORDER

Publisher

DataWriter

PARTITION

DataReader

Subscriber

DomainParticipant

offered QoS

Topicwrites reads

Domain Idjoins joins

produces-in consumes-from

RxO QoS Policies

requested QoS

Page 18: Building IoT Applications with Vortex and the Intel Edison Starter Kit

No single point of failure or bottleneck

Decentralised Data Space Data

Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

TopicDQoS

TopicDQoS

TopicAQoS

Page 19: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Connectivity is dynamically adapted to chose the most

effective way of sharing data

Adaptive ConnectivityData

Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

TopicDQoS

TopicDQoS

TopicAQoS

ThecommunicationbetweentheDataWriterandmatchingDataReaderscanbepeer-to-peerexploitingUDP/IP(UnicastandMulticast)orTCP/IP

ThecommunicationbetweentheDataWriterandmatchingDataReaderscanbe“brokered”butstillexploitingUDP/IP(UnicastandMulticast)orTCP/IP

Page 20: Building IoT Applications with Vortex and the Intel Edison Starter Kit

A domain-wide information’s class A Topic defined by means

of a <name, type, qos>

TopicDDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

TopicTypeName

QoS

Page 21: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryTopic Types

— Language Independent Declaration—

Page 22: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Topic types can be expressed using different syntaxes,

including IDL and ProtoBuf

Topic Type struct CarDynamics { string cid; long x; long y; float dx; long dy; } #pragma keylist CarDynamics cid

IDL

Page 23: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Topic types can be expressed using different syntaxes,

including IDL and ProtoBuf

Topic Type message CarDynamics { option (.omg.dds.type) = {name: "CarDynamics"}; required string cid = 0 [(.omg.dds.member).key = true]; required long x = 1; required long y = 2; required float dx = 3; required long dy = 4; }

ProtoBuf

Page 24: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryTopic Types

— Language Dependent Declaration—

Page 25: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Topic types can be expressed using different syntaxes,

including IDL and ProtoBuf

Topic Type class CarDynamics: constructor: (@cid, @x, @y, @dx, @dy) ->

CoffeeScript

Page 26: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Topic types can be expressed using different syntaxes,

including IDL and ProtoBuf

Topic Type public struct CaDynamics { public string cid { get; set; } public int x { get; set; } public int y { get; set; } public int dx { get; set; } public int dy { get; set; } public CaDynamics (string cid, int x, int y, int dx, int dy) { this.cid = cid; this.x = x; this.y = y; this.dx = dx; this.dy = dy; } }

C#

Page 27: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Topic types can be expressed using different syntaxes,

including IDL and ProtoBuf

Topic Type @KeyList ( topicType = "CarDynamics", keys = {"cid"})public class CarDynamics { public String cid; public int x; public int dx; public int y; public int dy; public CarDynamics(String s, int a, int b, int c,int d) { this.cid = s; this.x = a; this.dx = b; this.y = c; this.dy = d; } @Override public String toString() { … }}

Java

Page 28: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Vortex “knows” about application

data types and uses this

information provide type-

safety and content-based

routing

Content Awareness structCarDynamics{

@keystringcid;longx;longy;floatdx;longdy;}

cid x y dx dyGR 33N GO 167 240 45 0LO 00V IN 65 26 65 0AN 637 OS 32 853 0 50AB 123 CD 325 235 80 0

“dx>50ORdy>50”

Type

CarDynamics

cid x y dx dyLO 00V IN 65 26 65 0AB 123 CD 325 235 80 0

Page 29: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryProgramming Model

Page 36: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

4

Reading Data in C++#include <dds.hpp>

int main(int, char**) {

DomainParticipant dp(0); Topic<Meter> topic(”SmartMeter”); Subscriber sub(dp); DataReader<Meter> dr(dp, topic);

LambdaDataReaderListener<DataReader<Meter>> lst; lst.data_available = [](DataReader<Meter>& dr) { auto samples = data.read(); std::for_each(samples.begin(), samples.end(), [](Sample<Meter>& sample) { std::cout << sample.data() << std::endl; } } dr.listener(lst); // Print incoming data up to when the user does a Ctrl-C std::this_thread::join(); return 0; }

enumUtilityKind{ ELECTRICITY, GAS, WATER};structMeter{ stringsn; UtilityKindutility; floatreading; floaterror;};#pragmakeylistMetersn

Page 37: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryModeling Idioms

Page 38: Building IoT Applications with Vortex and the Intel Edison Starter Kit

A state that is periodically updated

Examples are the reading of a sensor (e.g. Temperature Sensor), the

position of a vehicle, etc.

Soft StateReliability=>BestEffortDurability=>VolatileHistory=>KeepLast(n)Deadline=>updatePeriodLatencyBudget=>updatePeriod/3DestinationOrder=>SourceTimestamp

// Vortex’s Scala API provides first class implementation of the // soft-state pattern val temperature = SoftState[AnalogSensor](topicName)

Page 39: Building IoT Applications with Vortex and the Intel Edison Starter Kit

A state that is sporadically updated and that often has temporal

persistence requirements

Examples are system configuration, a price estimate, etc.

Hard StateReliability=>ReliableDurability=>Transient|PersistentHistory=>KeepLast(n)(oftenn=1)DestinationOrder=>SourceTimestamp

// Vortex’s Scala API provides first class implementation of the // hard-state pattern. The state is transient by default and can be controlled // by an additional argument val runningMicrosvc = HardState[RunningMicrosvc](topicName)

Page 40: Building IoT Applications with Vortex and the Intel Edison Starter Kit

The occurrence of something noteworthy for our system

Examples are a collision alert, the temperature beyond a given

threshold, etc.

EventsReliability=>ReliableDurability=>anyHistory=>KeepAllDestinationOrder=>SourceTimestamp

// Vortex’s Scala API provides first class implementation of the // hard-state pattern. The state is transient by default and can be controlled // by an additional argument val nodeError = Event[NodeError](topicName)

Page 41: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Data-centric design leverage the same principle of Feedback-control

loops to assert a state

In other terms, the desired state is asserted by writing a topic and the

actual state is monitored.

A control action is taken when the desired and the actual state differ

Feedback Control Loop

Page 42: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Data-centric design leverage the same principle of Feedback-control

loops to assert a state

In other terms, the desired state is asserted by writing a topic and the

actual state is monitored.

A control action is taken when the desired and the actual state differ

Feedback Control Loop Hard State

Soft State

microservice

Page 43: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryVortex Technology Stack

Page 44: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Device implementations optimised for OT, IT and

consumer platforms

Native support for Cloud and Fog Computing Architectures

Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 45: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Polyglot and Interoperable across Programming

Languages Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 46: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Fully Independent of the Cloud Infrastructure

Private Clouds

Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 47: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Native Integration with the hottest real-time analytics

platforms and CEP Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 48: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Integration with the popular Node-RED framework

Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 49: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Integration with mainstream Dashboard Technologies

Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 50: Building IoT Applications with Vortex and the Intel Edison Starter Kit

High Performance 30 μs peer-to-peer latency

4+ Mmsgs/sec p2p throughput

Device-2-DeviceDevice-2-Cloud

Fog-2-Cloud

Device-2-Fog

Cloud-2-Cloud

Fog-2-Fog

infra

structure

sdk

Page 51: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryIntel Edison Starter Kit

Page 52: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Edison is an Octo-Linux based x86 board for prototyping IoT

applications

Edison shirts an Intel optimised OpenJDK implementation — perfect

for Café

The Grove Starter Kit Plus provides a set of nice sensor, displays and

actuators to get started with IoT

IoT Starter Kit

Page 53: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Before getting started with playing with the demo, make sure your

board is properly configured

You can check the configuration using the configure_edison

command

Ensure that the WiFi is working!

Configuring your Board

Page 54: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiarySensors

Page 55: Building IoT Applications with Vortex and the Intel Edison Starter Kit
Page 56: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryDisplays

Page 57: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

Page 58: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryLED

Page 59: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

Page 60: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryProgramming

Page 61: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Intel has contributed several Open Source project that provide high

level abstractions to access Sensors, LCD, Led, etc. , for a very large

number of different kinds of sensors and manufacturers

Programming

Page 62: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

LED

Light Sensor

Page 63: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

IoT Applications with Vortex and Edison

Page 64: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Cloud

FogFog

Fog

Fog

Page 65: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5

Page 66: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Vortex can be used to virtualise sensors/displays/motors/.. and make them universally available

Instead of locally programming sensors/displays/motors we

abstracts them with Topics and access /control through DDS in a

location transparent manner

Virtualisation

DDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

Page 67: Building IoT Applications with Vortex and the Intel Edison Starter Kit

The agentv micro service framework is used to flexibly

provision and manage applications

Deployment

DDS Global Data Space

...

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Data Writer

TopicAQoS

TopicBQoS

TopicCQoS

TopicDQoS

Page 68: Building IoT Applications with Vortex and the Intel Edison Starter Kit

struct AnalogSensor { short id; float rvalue; float value; }; #pragma keylist AnalogSensor id

Temperature Sensor

TopicAnalogSensor

Temperature

Soft S

tate

sensor specific microsvc

write

read

read

read

Page 69: Building IoT Applications with Vortex and the Intel Edison Starter Kit

struct LCDText { short id; unsigned short row; unsigned short col; string text; }; #pragma keylist LCDText id

LCD TopicLCDText

LCDText

Hard

State

sensor specific microsvc

read

read

struct LCDColor { short id; short r; short g; short b; }; #pragma keylist LCDColor id

TopicLCDColor

LCDColor

Hard

State

write

write

write

Page 70: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiaryCoding-Lab

Page 71: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

Page 72: Building IoT Applications with Vortex and the Intel Edison Starter Kit

This slides have been crafted by Angelo Corsaro

Any use of these slides that does include me as Author/Co-Author is plagiary

Page 73: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Vortex makes it extremely easy to build IoT applications

Get started Building IoT apps with Vortex and Edison!

In Summary

Page 74: Building IoT Applications with Vortex and the Intel Edison Starter Kit

Cop

yrig

ht P

rism

Tech

, 201

5