Presentation of a paper accepted at the 4th Internetional Conference on Fog and Mobile Edge Computing (FMEC).
It discusses a decentralised, self-organising, spatial, collective approach to the development of edge-clouds/edge computing ecosystems.
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spatial Approach
1. Coordinating Computation at the Edge:
a Decentralized, Self-Organizing, Spatial Approach
Roberto Casadei, Mirko Viroli
ALMA MATER STUDIORUM–Università di Bologna, Cesena, Italy
FMEC’19, Rome, Italy
R. Casadei Introduction and Motivation Contribution Wrap-up 1/18
2. Outline
1 Introduction and Motivation
2 Contribution
3 Wrap-up
R. Casadei Introduction and Motivation Contribution Wrap-up 2/18
3. IoT / mobile / edge devices
R. Casadei Introduction and Motivation Contribution Wrap-up 3/18
4. P2P / mobile edge-cloud
R. Casadei Introduction and Motivation Contribution Wrap-up 3/18
6. why edge-clouds?
exploit locality
no global connectivity
exploit resources (cf., volunteer computing)
R. Casadei Introduction and Motivation Contribution Wrap-up 4/18
7. why edge-clouds?
exploit locality
no global connectivity
exploit resources (cf., volunteer computing)
R. Casadei Introduction and Motivation Contribution Wrap-up 4/18
8. why edge-clouds?
exploit locality
no global connectivity
exploit resources (cf., volunteer computing)
R. Casadei Introduction and Motivation Contribution Wrap-up 4/18
9. why edge-clouds?
exploit locality
no global connectivity
exploit resources (cf., volunteer computing)
R. Casadei Introduction and Motivation Contribution Wrap-up 4/18
10. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
11. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
12. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
13. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
14. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
issues
dynamicity self-*
little reliability resilience via self-*
little connectivity nbr-based communication
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
15. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
issues
dynamicity self-*
little reliability resilience via self-*
little connectivity nbr-based communication
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
16. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
issues
dynamicity self-*
little reliability resilience via self-*
little connectivity nbr-based communication
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
17. problem
decentralized coordination of edge resources and
computations in open scenarios with minimal
infrastructural/connectivity assumptions
issues
dynamicity self-*
little reliability resilience via self-*
little connectivity nbr-based communication
but also... what programming model?
R. Casadei Introduction and Motivation Contribution Wrap-up 5/18
18. Outline
1 Introduction and Motivation
2 Contribution
3 Wrap-up
R. Casadei Introduction and Motivation Contribution Wrap-up 6/18
20. Background » Aggregate Computing [4, 10]
macro, spatial approach to CAS
development
computational field calculus
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
21. Background » Aggregate Computing [4, 10]
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
22. Background » Aggregate Computing [4, 10]
sensors
local functions
actuators
Application
Code
Developer
APIs
Field Calculus
Constructs
Resilient
Coordination
Operators
Device
Capabilities
functions repnbr
TGCfunctions
communication state
PerceptionPerception
summarize
average
regionMax
…
ActionAction StateState
Collective BehaviorCollective Behavior
distanceTo
broadcast
partition
…
timer
lowpass
recentTrue
…
collectivePerception
collectiveSummary
managementRegions
…
Crowd ManagementCrowd Management
dangerousDensity crowdTracking
crowdWarning safeDispersal
restriction
selfstabilisation
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
23. Background » Aggregate Computing [4, 10]
execution model (protocol)
“continuous” execution and coordination
async rounds of computation
async exchange of coordination data with neighbours
− full execution of the same aggregate program against a
“local context”
device state
sensor readings
neighbourhood coordination data
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
24. Background » Aggregate Computing [4, 10]
“hello world” example (gradient)
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
25. Background » Aggregate Computing [4, 10]
“hello world” example (gradient)
class MyProgram extends AggregateProgram {
override def main =
rep(Double.PositiveInfinityinfinity)(distance =>
mux(source){
0.0
}{
minHoodPlus( nbr{distance} + metric )))
}
)
}
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
27. Background » Aggregate Computing [4, 10]
nice things about aggregate
computing
predictable composition of emergent behaviour [3]
declarativity [11]
dynamic exec on available edge/cloud infrastructure
self-stabilization [9]
practical (see PLs/tools like ScaFi [5])
much more [10]
R. Casadei Introduction and Motivation Contribution Wrap-up 8/18
28. Edge Ecosystem Model
structure: dynamic, spatial areas
resource providers (workers) and consumers (users, clients)
manager nodes (leaders)
relay nodes (links)
R. Casadei Introduction and Motivation Contribution Wrap-up 9/18
29. Edge Ecosystem Model
structure: dynamic, spatial areas
resource providers (workers) and consumers (users, clients)
manager nodes (leaders)
relay nodes (links)
dynamics
dynamic election of leaders and formation of areas
data/event/request upstreaming (workers/consumers leaders)
control/data downstreaming (leaders workers/consumers)
R. Casadei Introduction and Motivation Contribution Wrap-up 9/18
30. Edge Ecosystem Model
structure: dynamic, spatial areas
resource providers (workers) and consumers (users, clients)
manager nodes (leaders)
relay nodes (links)
dynamics
dynamic election of leaders and formation of areas
data/event/request upstreaming (workers/consumers leaders)
control/data downstreaming (leaders workers/consumers)
properties
decentralised, neighbour-to-neighbour interaction
self-organisation
space-time evolution
R. Casadei Introduction and Motivation Contribution Wrap-up 9/18
32. combining various design patterns
decentralised, self-healing gradient [2]
decentralised, self-healing leader election [7]
information flows and feedback loops [6]
− information spreading [8]
− information collection [1]
R. Casadei Introduction and Motivation Contribution Wrap-up 11/18
33. Implementation Schema
class EdgeCloudCoordinationWorkflow extends AggregateProgram with ... {
// Some definitions (excluded for brevity)
def main = { // Entry point of the specification, to be interpreted in full every
round
// 1) Elect managers among powerful "fog" nodes; output is a bool field
val leaders = branch(FOG){ S(grain) }{ false } // 'true' in current leaders
branchOn(EDGE || FOG) {
// 2) Build the adaptive communication structure, based on a
// potential field pointing to leaders for information down-/up-streaming
val potential = branch(leaders || RELAY) { distanceTo(leaders) } { +∞ }
val cs = CommunicationStructure(leaders, potential)
// 3) Sets up a "continuous" feedback control loop base
rep(DownstreamData.empty){ case dFlow =>
val data = branchOn(isWorker || isConsumer){ execute(dFlow) }
val uFlow = dataUpstreaming(cs, data)
val controlData = branchOn(leaders){ processData(uFlow) }
dataDownstreaming(cs, controlData)
} } }
// Workers/clients receive instructions/events from leaders and produce data
def execute(dd: DownstreamData): Data
// Data/events produced by workers/clients has to be aggregated & streamed to leaders
def dataUpstreaming(cs: CommunicationStructure, data: Data): UpstreamData
// Leaders process upstream data/events and produce control instructions/events
def processData(ud: UpstreamData): ControlData
// Control instructions/events or area-wide information is sent around the area
def dataDownstreaming(cs: CommunicationStructure, cd: ControlData): DownstreamData
}
R. Casadei Introduction and Motivation Contribution Wrap-up 12/18
34. Toolchain and experiments
ScaFi: Aggregate Computing toolkit
https://github.com/scafi/scafi
Alchemist simulator
https://github.com/AlchemistSimulator/Alchemist
experiments repo
https://github.com/metaphori/fmec19-edgecloud
R. Casadei Introduction and Motivation Contribution Wrap-up 13/18
35. Case study
smart city environment
50 fog nodes
200 worker/relay nodes supporting 0-5 services
500 clients unevenly distributed
interaction in 50m range
peek of requests in timeframe [150, 250]
for each configuration, 30 simulation rounds
R. Casadei Introduction and Motivation Contribution Wrap-up 14/18
37. Basic evaluation: correctness of coordination
more leaders
lower load on relays/leaders
few leaders
higher load on relays/leaders
R. Casadei Introduction and Motivation Contribution Wrap-up 15/18
38. Basic evaluation: correctness of coordination
higher utilization of workers
area-wise
lower utilization of workers
area-wise
R. Casadei Introduction and Motivation Contribution Wrap-up 15/18
39. Basic evaluation: correctness of coordination
higher unavailability (declined
tasks) more retries
more services available in
each area
R. Casadei Introduction and Motivation Contribution Wrap-up 15/18
40. Outline
1 Introduction and Motivation
2 Contribution
3 Wrap-up
R. Casadei Introduction and Motivation Contribution Wrap-up 16/18
41. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
42. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
43. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
44. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
45. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
future work
quantitative evaluation + smarter extensions
aggregate computing middleware
real-world case study
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
46. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
future work
quantitative evaluation + smarter extensions
aggregate computing middleware
real-world case study
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
47. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
future work
quantitative evaluation + smarter extensions
aggregate computing middleware
real-world case study
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
48. contribution
a decentralised, self-org, spatial, collective approach to
development of edge-clouds
aggregate computing implementation
example of a coordination pattern (SCR, @COORD’19)
future work
quantitative evaluation + smarter extensions
aggregate computing middleware
real-world case study
R. Casadei Introduction and Motivation Contribution Wrap-up 17/18
49. References (1/1)
[1] Giorgio Audrito et al. “Effective Collective Summarisation of Distributed Data in Mobile Multi-Agent
Systems”. In: Proceedings of the 18th International Conference on Autonomous Agents and
MultiAgent Systems. International Foundation for Autonomous Agents and Multiagent Systems.
2019, pp. 1618–1626.
[2] Giorgio Audrito et al. “Compositional blocks for optimal self-healing gradients”. In: Conf. on
Self-Adaptive and Self-Organizing Systems (SASO). IEEE. 2017, pp. 91–100.
[3] Giorgio Audrito et al. “A Higher-Order Calculus of Computational Fields”. In: ACM Transactions on
Computational Logic 20.1 (Jan. 2019), 5:1–5:55. ISSN: 1529-3785. DOI: 10.1145/3285956.
[4] Jacob Beal, Danilo Pianini, and Mirko Viroli. “Aggregate Programming for the Internet of Things”. In:
IEEE Computer (2015). ISSN: 1364-503X.
[5] Roberto Casadei, Danilo Pianini, and Mirko Viroli. “Simulating large-scale aggregate MASs with
Alchemist and Scala”. In: FedCSIS, Proceedings of. IEEE. 2016, pp. 1495–1504.
[6] Tom De Wolf and Tom Holvoet. “Designing self-organising emergent systems based on information
flows and feedback-loops”. In: Self-Adaptive and Self-Organizing Systems, 2007. SASO’07. 1st
Conf. on. IEEE. 2007, pp. 295–298.
[7] Yuanqiu Mo, Jacob Beal, and Soura Dasgupta. “An Aggregate Computing Approach to
Self-Stabilizing Leader Election”. In: 2018 IEEE 3rd International Workshops on Foundations and
Applications of Self* Systems (FAS* W). IEEE. 2018, pp. 112–117.
[8] Yuanqiu Mo, Soura Dasgupta, and Jacob Beal. “Robust Stability of Spreading Blocks in Aggregate
Computing”. In: 2018 IEEE Conference on Decision and Control (CDC). IEEE. 2018,
pp. 6007–6012.
R. Casadei Appendix References 18/18
50. References (2/1)
[9] Mirko Viroli et al. “Engineering Resilient Collective Adaptive Systems by Self-Stabilisation”. In: ACM
Transactions on Modeling and Computer Simulation 28.2 (2018), 16:1–16:28.
[10] Mirko Viroli et al. “From Field-Based Coordination to Aggregate Computing”. In: Int. Conf. on
Coordination Languages and Models. Springer. 2018, pp. 252–279.
[11] Mirko Viroli, Roberto Casadei, and Danilo Pianini. “On execution platforms for large-scale
aggregate computing”. In: UbiComp, Proceedings of. ACM. 2016, pp. 1321–1326.
R. Casadei Appendix References 19/18