1. On Building Smart City IoT Applications:
a Coordination-based Perspective
Nam Ky Giang, Rodger Lea, Michael Blackstock,
Victor C.M. Leung
{kyng, rodgerl, vleung}@ece.ubc.ca,
mblackst@magic.ubc.ca
Dec 2016
The Second International Workshop on Smart Cities:
People, Technology and Data (IWSC16)
2. Contents
2
● Background
○ Smart City applications
○ Fog Computing architecture
○ The problem
● Requirements
● Dataflow programming model
○ Distributed Dataflow
○ System architecture
○ Adaptive Distributed Dataflow
● Prototyping with Node-RED
● Related work
● Roadblocks
● Conclusion
3. Smart City applications
● Smart Transportation
○ Intelligent parking
○ Autonomous Vehicles Network
● Smart Buildings
○ Energy aware
○ Inter-building navigation
● Environmental Sensing
○ Sustainable cities
○ City insights
Data-Intensive
Large scale distributed
Heterogeneous
Dynamic, mobile
3
4. Fog Computing architecture
● Fog Computing has been proposed to complement Cloud Computing
○ leverages resources within and at the edge of the network
● Architecture for largely distributed components
○ Large in quantity - the “thing scale”
○ Dynamic, mobile and heterogeneous
Edge Network
Communication
Infrastructure
Cloud
P2P, Edge
Fog
CDN
Cloud,
Decentralized Cloud
4
5. Developing Smart City applications inherits
difficulties in Distributed Systems, yet requires extra
supports for mobile, heterogeneous and largely
distributed devices.
What a Smart City application looks like?
How do we facilitate the development process?
5
6. Smart City application requirements
6
● Component-based
○ Reusable
○ Distributed
● Coordination-based
○ Macro-programming
○ Adaptive
● Dataflow-based
○ Collection, manipulation
and dissemination of
data streams
Software
Component
Software
Component
Software
Component
Dataflow programming model looks like a promising approach for
coordinating Smart City components
7. Dataflow programming
7
● Distributed Dataflow embraces
○ Deployment spec (what runs where)
○ Stream processing
○ Visual language
Data
Stream
Cloud
MB
MB
A smart city
application
8. System Architecture
8
● Coordination-in-the-large
○ Semi peer-2-peer orchestration (Cloud & Fog interplay)
○ Adapt to device mobility
Context
Data Data
Context
Data Data
Device
Process Process
Device
Process
Broker Broker Broker
Coordinator
App
App
App
App
Data Flow
Control Flow
Fog
Cloud
9. Adaptive Distributed Dataflow
9
● Express the context of underlying device
● Adapt to change - self-adapt vs externally-coordinated
○ Location
○ Computation load
In Trento
Police’s
Handset
On Server X
Mem & CPU
Intensive
Mem & CPU
Requirement
10. Adaptive Distributed Dataflow
10
● Context preservation
○ Inherent problem of Distributed Dataflow
○ Data-tagging vs Externally-coordinated
Which devices
produced this
piece of data?
Merge by the
devices that run
“Green”
11. Adaptive Distributed Dataflow
11
● Large scale coordination
○ Dependency arity (1-1, 1-N, N-1, N-N)
○ Inter-device communication
■ Peer-2-peer won’t work to the scale (the “thing-scale”)
■ Cloud-based solutions introduce significant delay
13. Related Work
13
● Distributed programming models
○ Mixture of computation and communication logics
● Macro programming in WSN
○ Mobility (!= Availability) not addressed
○ Statically compiled and run, no adaptation → no coordination
● Coordination models and languages
○ Mobility not addressed
○ Coordination-in-the-large remains difficult
14. Macro programming in WSNs
Bakshi et. al (2005)
Mainland et. al (2006)
Applications are modeled as dataflow graphs
and are compiled into executable codes that will
be downloaded onto embedded devices.
14
Awan et. al (2007)
17. Conclusion
17
● Programming Smart City applications in Fog Computing has
its own challenges
○ Large scale, distributed, mobile and heterogeneous
computing systems
● Adaptive Distributed Dataflow offers a promising model
○ Reusable software components
○ Adapt to dynamic nature of devices
○ Large scale coordination