19
Developing IoT Applications in the Fog: a Distributed Dataflow Approach Nam Giang ([email protected]), Michael Blackstock, Rodger Lea, Victor Leung University of British Columbia IoT2015, Seoul Korea

Developing io t applications in the fog a distributed dataflow approach

Embed Size (px)

Citation preview

Developing IoT Applications in the Fog: a Distributed

Dataflow ApproachNam Giang ([email protected]), Michael Blackstock, Rodger

Lea, Victor LeungUniversity of British Columbia

IoT2015, Seoul Korea

Cloud-based IoT applications

a combination of embedded web services coordinated by the cloud

HTTP

CoAP

MQTT

HTTP

Problems of Cloud-based IoT

Timeliness?Redundancy?Scalability?Security?

HTTP

MQTT

CoAPHTTP

Same room

300ms500ms

Smart gateway-based IoT

HTTP

Same network

Local execution

MQTT

HTTP

Fog Computing

Distributed computation

System architecture for the IoT

aka. In-network Processing, Cloudlets

Local execution

Intermediate execution

FOG

Fog-based IoT apps

Local execution

Intermediate execution

Four computational parts1: gesture recog.2: turn light on3: if home, update Twitter4: log activity

Challenges: Perception-Action Cycle

FOG

FOG

fog-to-fog

fog-to-cloud

cloud-to-fog

cloud-to-cloud

Challenges: Heterogeneity

FOG

Horizontal Heterogeneity

Ver

tical

Het

erog

enei

ty

Resourceful devices

Constrained devices

Compute NodesIO Nodes Edge Nodes

Challenges: Scalability

Largely distributed execution environment

Pull de

ploym

ent

Challenges: Mobility

Mobility of the executors

Backups of executors?

Local execution

Intermediate execution

FOG

Distributed Flow-based (Dataflow) Model

Sensor

Actuator

Web Service

RoutinesRoutines

Web Service

ActuatorSame Network

On Cloud

At Specific location

Same Device

- reusable nodes- no centralized coord.- simple IO model

Dataflow Programming Model

- Well defined execution unitsinputs outputs

- Acyclic graphs

- Was created for concurrent execution, later on was used as a coordination language

- Customizable nodes library

Node-RED project http://nodered.org

FRED project https://fred.sensetecnic.com

Distributed Node-RED

Node-RED CloudMaster Flow

...

Raspberry Pis

Master Flow

Special node for inter-devices wiring

Experience with DNR

TI SensorTag

Lessons learned

● Flow-based model is generic enough to accommodate the heterogeneity but still supports domain-specific applications

● Node-level development is domain-specific● Node-RED project is written in JavaScript - very

easy to develop new nodes

Open problems

● Inter-nodes communication is hard: define “same room/building” communication?

● Distributed Service Discovery/Resource Directory● Multiple flows per device

○ resource conflicts

Conclusion

- Fog computing is a promising architectural model for the IoT

- New challenges when developing IoT applications in the Fog

- Distributed Dataflow model a promising approach to supporting Fog-based IoT applications

Thank you