Developing IoT Applications
in the Fog: a Distributed
Dataflow Approach
Nam Giang (kyng@ece.ubc.ca), Michael Blackstock, Rodger
Lea, Victor Leung
University 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
CoAP
HTTP
Same room
300ms
500ms
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 parts
1: gesture recog.
2: turn light on
3: if home, update Twitter
4: 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
VerticalHeterogeneity
Resourceful
devices
Constrained
devices
Compute Nodes
IO Nodes
Edge Nodes
Challenges: Scalability
Largely
distributed
execution
environment
Pull deploym
ent
Challenges: Mobility
Mobility of the
executors
Backups of
executors?
Local
execution
Intermediate
execution
FOG
Distributed Flow-based (Dataflow)
Model
Sensor
Actuator
Web Service
Routines
Routines
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 units
inputs 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 Cloud
Master 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

Developing io t applications in the fog a distributed dataflow approach