SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
Practical Aggregate Programming in Scala
Roberto Casadei
PhD Student in CS&Eng
roby.casadei@unibo.it
Department of Computer Science and Engineering
University of Bologna
Student talk at Scala Symposium, Amsterdam 2016
Slides available at http://www.slideshare.net/RobertoCasadei/presentations
Sample code at https://bitbucket.org/metaphori/scafi-tutorial
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 1 / 30
Outline
1 Aggregate Computing: The Basics
2 SCAFI: Practical Aggregate Programming in Scala
3 Conclusion
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 2 / 30
Aggregate Computing: The Basics
Outline
1 Aggregate Computing: The Basics
2 SCAFI: Practical Aggregate Programming in Scala
3 Conclusion
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 3 / 30
Aggregate Computing: The Basics
Problem: design/programming CASs
Collective/Complex Adaptive Systems (CASs)
Structure: Environment + (Mobile, Large-scale) Networks of { people + devices }
Global interpretation: embedded devices collectively form a “diffused” computational system
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 4 / 30
Aggregate Computing: The Basics
An approach to CAS development
Issues ⇒ approach
• Large-scale ⇒ decentralised coordination
• Situatedness + distributed autonomy ⇒ substantial unpredictability ⇒ self-*
• Complex collective behavior ⇒ good abstractions, layered approach, compositionality
Shifting the mindset: from local to global
• Declarativeness and the global viewpoint
• Crowd-aware services
• Failure recovery of enterprise services
• Distributed monitoring and reacting (e.g., temperature, fire)
• Expected global behavior vs. traditional device-centric interface
⇒ Aggregate Programming [BPV15]: a paradigm for programming whole aggregates of devices.
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 5 / 30
Aggregate Computing: The Basics
Aggregate programming [BPV15]
From the local/device-centric viewpoint to the global/aggregate viewpoint
Aggregate programming: what
Goal: programming the collective behaviour of aggregates (of devices) ⇒ global-to-local
Aggregate programming: how
Prominent approach (generalizing over several prior approaches and strategies [BDU+
12])
founded on field calculus and self-org patterns
• Computational fields as unifying abstraction of local/global viewpoints
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 6 / 30
Aggregate Computing: The Basics
Aggregate Programming Stack
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 7 / 30
Aggregate Computing: The Basics
Aggregate (computing) systems & Execution model
Structure ⇒ (network/graph)
• A set of devices (aka nodes/points/things).
• Each device is able to communicate with a subset of devices known as its neighbourhood.
Dynamics
Each device is given the same aggregate program and works at async / partially-sync rounds:
(1) Retrieve context
⇐ Messages from neighbours
⇐ Sensor values
(2) Aggregate program execution
⇒ export (a tree-like repr of computation) + output (result of last expr in body)
(3) Broadcast export to neighbourhood
(4) Execute actuators
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 8 / 30
SCAFI: Practical Aggregate Programming in Scala
Outline
1 Aggregate Computing: The Basics
2 SCAFI: Practical Aggregate Programming in Scala
3 Conclusion
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 9 / 30
SCAFI: Practical Aggregate Programming in Scala
SCAFI: Scala with Computational Fields
Goal: bring Aggregate Computing to the field of mainstream software development
What
SCAFI [CV16] is an integrated framework for building systems with aggregate programming.
• Scala-internal DSL for expressing aggregate computations.
• Linguistic support + execution support (interpreter/VM)
• Correct, complete, efficient impl. of the Higher-Order Field Calculus
semantics [DVPB15]
• Distributed platform for execution of aggregate systems.
• Support for multiple architectural styles and system configurations.
• Actor-based implementation (based on Akka).
Where
• https://bitbucket.org/scafiteam/scafi
libraryDependencies += "it.unibo.apice.scafiteam" % "scafi-core_2.11" % "0.1.0" // on Maven Central
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 10 / 30
SCAFI: Practical Aggregate Programming in Scala
Computational fields [DVB16]
• (Abstract interpretation) Mapping space-time to computational objects
• (Concrete interpretation) Mapping devices to values: φ : δ →
• “Distributed” data structure working as the global abstraction
• The bridge abstraction between local behavior and global behavior
Discrete systems as an approximation of
spacetime
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 11 / 30
SCAFI: Practical Aggregate Programming in Scala
Field/aggregate computations
Global viewpoint
• Aggregate interpretation
• Natural/denotational semantics
• Program: computation over whole fields
• Output (at a given time): system-wide
snapshot of a computational field
• Geometric view: properties of collections
of points
Local viewpoint
• Device-centric interpretation
• Operational semantics
• Program: steps of a single device
• Output (at a given time): latest value
yielded by the device
• Geometric view: properties of a single
point
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 12 / 30
SCAFI: Practical Aggregate Programming in Scala
So, what is an aggregate program?
• The global program
– "Local programs" obtained via global-to-local mapping
• May take the form of field calculus programs (in the representation given by some PL)
– Actually, the field calculus is like FJ for Java, or the lambda calculus for Haskell
• An aggregate program consists of
1) A set of function definitions
2) A body of expressions.
• Example: an aggregate program in SCAFI
class MyProgram extends AggregateProgram with MyAPI {
def isSource = sense[Boolean]("source")
// Entry point for execution
override def main() = gradient(isSource)
}
– Each device of the aggregate system is given an instance of MyProgram.
– Each device repeatedly runs the main method at async rounds of execution.
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 13 / 30
SCAFI: Practical Aggregate Programming in Scala
Computing with fields
Expressing aggregate/field computations in SCAFI
trait Constructs {
def rep[A](init: A)(fun: (A) => A): A
def nbr[A](expr: => A): A
def foldhood[A](init: => A)(acc: (A,A)=>A)(expr: => A): A
def aggregate[A](f: => A): A
// Not primitive, but foundational
def sense[A](name: LSNS): A
def nbrvar[A](name: NSNS): A
def branch[A](cond: => Boolean)(th: => A)(el: => A): A
}
• Mechanisms for context-sensitiveness: nbr, nbrvar, sense
• Mechanisms for field evolution: rep
• Mechanisms for interaction: nbr
• Mechanisms for field domain restriction and partitioning: aggregate, branch
• Reference formal system: field calculus [DVB16, DVPB15]
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 14 / 30
SCAFI: Practical Aggregate Programming in Scala
Simple fields
0
(x)=>x+1
true t<0,1>
Constant, uniform field: 5
– Local view: evaluates to 5 in the context of a single device
– Global view: yields a uniform constant field that holds 5 at any point (i.e., at any device)
Constant, non-uniform field: mid()
– mid() is a built-in function that returns the ID of the running device
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 15 / 30
SCAFI: Practical Aggregate Programming in Scala
rep: dynamically evolving fields
rep
0
(x)=>x+1
t
v0
t
v1
..
rep(0){(x)=>x+1}
// Signature: def rep[A](init: A)(fun: (A) => A): A
// Initially 0; state is incremented at each round
rep(0){ _+1 }
– Notice: the frequency of computation can vary over time and from device to device
– In general, the resulting field will be heterogeneous in time and space
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 16 / 30
SCAFI: Practical Aggregate Programming in Scala
nbr: interaction, communication, observation
nbr de
nbr{e}
φd=[d1→v1,..,dn→vn]
– Local view: nbr returns a field from neighbors to their corresponding value of the given expr e
– Global view: a field of fields
– Needs to be reduced using a *hood operation
– foldhood works by retrieving the value of expr for each neighbour and then folding over the
resulting structure as you’d expect from FP.
// Signature: def nbr[A](expr: => A): A
// Signature: def foldhood[A](init: => A)(acc: (A,A)=>A)(expr: => A): A
foldhood(0)(_+_){ nbr{1} }
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 17 / 30
SCAFI: Practical Aggregate Programming in Scala
Context-sensitiveness and sensors
Local context:
1) The export of the previous computation
2) Messages received from neighbours
3) Values perceived from the physical/software environment
Sensing
// Query a local sensor
sense[Double]("temperature")
// Compute the maximum distance from neighbours
foldhood(Double.MinValue)(max(_,_)){ // Also: maxHood {...}
nbrvar[Double](NBR_RANGE_NAME)
}
– nbr queries a local sensor
– nbrvar queries a "neighbouring sensor" (a sort of "environmental probe")
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 18 / 30
SCAFI: Practical Aggregate Programming in Scala
Field domain restriction
Alignment
• Aggregate computations can be represented as a trees
• Device exports are "paths" along these trees
• When two devices execute the same tree node, they are said to be aligned
• Interaction is possible only between aligned devices
Use cases for branch
• Partitioning the space into subspaces performing subcomputations
• Regulating admissible interactions (i.e., further restricting the neighbourhood)
branch(sense[Boolean]("flag")){
compute(...) // sub-computation
}{
Double.MaxValue // stable value (i.e., not computing)
}
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 19 / 30
SCAFI: Practical Aggregate Programming in Scala
Functions
Two kinds of functions in SCAFI:
1) "Normal" Scala functions: serve as units for encapsulating behavior/logic
def foldhoodMinus[A](init: => A)(acc: (A,A) => A)(ex: => A): A =
foldhood(init)(acc){ mux(mid()==nbr(mid())){ init }{ ex } }
def isSource = sense[Boolean]("source")
2) First-class "aggregate" functions [DVPB15] – which also work as units for alignment
def branch[A](cond: => Boolean)(th: => A)(el: => A): A =
mux(cond, ()=>aggregate{ th }, ()=>aggregate{ el })()
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 20 / 30
SCAFI: Practical Aggregate Programming in Scala
Example: the gradient [BBVT08]
def nbrRange = nbrvar[Double](NBR_RANGE_NAME)
def gradient(source: Boolean): Double =
rep(Double.PositiveInfinity){ distance =>
mux(source) {
0.0
}{
minHood { nbr{distance} + nbrRange }
}
}
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 21 / 30
SCAFI: Practical Aggregate Programming in Scala
Example: the channel I
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 22 / 30
SCAFI: Practical Aggregate Programming in Scala
Example: the channel II
Each device is given the same aggregate program:
class ChannelProgram extends AggregateProgram with ChannelAPI {
def main = channel(isSource, isDestination, width)
}
def channel(src: Boolean, dest: Boolean, width: Double) =
distanceTo(src) + distanceTo(dest) <= distBetween(src, dest) + width
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 23 / 30
SCAFI: Practical Aggregate Programming in Scala
Example: the channel III
trait ChannelAPI extends Language with Builtins {
def channel(src: Boolean, dest: Boolean, width: Double) =
distanceTo(src) + distanceTo(dest) <= distBetween(src, dest) + width
def G[V:OB](src: Boolean, field: V, acc: V=>V, metric: =>Double): V =
rep( (Double.MaxValue, field) ){ dv =>
mux(src) { (0.0, field) } {
minHoodMinus {
val (d, v) = nbr { (dv._1, dv._2) }
(d + metric, acc(v))
}
}
}._2
def broadcast[V:OB](source: Boolean, field: V): V =
G[V](source, field, x=>x, nbrRange())
def distanceTo(source: Boolean): Double =
G[Double](source, 0, _ + nbrRange(), nbrRange())
def distBetween(source: Boolean, target: Boolean): Double =
broadcast(source, distanceTo(target))
def nbrRange(): Double = nbrvar[Double](NBR_RANGE_NAME)
def isSource = sense[Boolean]("source"); def isDestination = sense[Boolean]("destination")
}
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 24 / 30
SCAFI: Practical Aggregate Programming in Scala
Scaling with complexity
General coordination operators [VBDP15]
• Gradient-cast: accumulates values “outward” along a gradient starting from source nodes.
def G[V:OB](src: Boolean, init: V,
acc: V=>V, metric: =>Double): V
• Converge-cast: collects data distributed across space “inward” by accumulating values from
edge nodes to sink nodes down a “potential” field.
def C[V:OB](potential: V, acc: (V,V)=>V, local: V, Null: V): V
• Time-decay: supports information summarisation across time.
def T[V:Numeric](initial: V, floor: V, decay: V=>V): V
• Sparse-choice: supports creation of partitions and selection of sparse subsets of devices in
space
def S(grain: Double, metric: => Double): Boolean
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 25 / 30
SCAFI: Practical Aggregate Programming in Scala
A case study: crowd engineering [CPV16]
val (high,low,none) = (2,1,0) // crowd level
def crowdWarning(p: Double, r: Double, warn: Double, t: Double):
Boolean =
distanceTo(crowdTracking(p,r,t) == high) < warn
def crowdTracking(p: Double, r: Double, t: Double) = {
val crowdRgn = recentTrue(densityEst(p, r)>1.08, t)
branch(crowdRgn){ dangerousDensity(p, r) }{ none }
}
def dangerousDensity(p: Double, r: Double) = {
val mr = managementRegions(r*2, () => { nbrRange })
val danger = average(mr, densityEst(p, r)) > 2.17 &&
summarize(mr, (_:Double)+(_:Double), 1 / p, 0) > 300
mux(danger){ high }{ low }
}
// Auxiliary functions
def recentTrue(state: Boolean, memTime: Double): Boolean
def managementRegions(grain: Double,
metric: => Double): Boolean = S(gran,metric)
def densityEst(p: Double, range: Double): Double
def summarize(sink: Boolean, acc: (Double,Double)=>Double,
local: Double, Null: Double): Double
def average(sink: Boolean, value: Double): Double
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 26 / 30
SCAFI: Practical Aggregate Programming in Scala
Quick platform setup
// STEP 1: CHOOSE INCARNATION
import it.unibo.scafi.incarnations.{ BasicActorP2P => Platform }
// STEP 2: DEFINE AGGREGATE PROGRAM SCHEMA
class Demo_AggregateProgram extends Platform.AggregateProgram {
override def main(): Any = foldhood(0){_ + _}(1)
}
// STEP 3: DEFINE MAIN PROGRAM
object Demo_MainProgram extends Platform.CmdLineMain
1) Demo_MainProgram -h 127.0.0.1 -p 9000
-e 1:2,4,5;2;3 --subsystems 127.0.0.1:9500:4:5
--program "demos.Demo_AggregateProgram"
2) Demo_MainProgram -h 127.0.0.1 -p 9500
-e 4;5:4
--program "demos.Demo_AggregateProgram"
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 27 / 30
SCAFI: Practical Aggregate Programming in Scala
Manual node setup
// STEP 1: CHOOSE INCARNATION
import scafi.incarnations.{ BasicActorP2P => Platform }
import Platform.{AggregateProgram,Settings,PlatformConfig}
// STEP 2: DEFINE AGGREGATE PROGRAM SCHEMA
class Program extends AggregateProgram with CrowdAPI {
// Specify a "dangerous density" aggregate computation
override def main(): Any = crowdWarning(...)
}
// STEP 3: PLATFORM SETUP
val settings = Settings()
val platform = PlatformConfig.setupPlatform(settings)
// STEP 4: NODE SETUP
val sys = platform.newAggregateApplication()
val dm = sys.newDevice(id = Utils.newId(),
program = Program,
neighbours = Utils.discoverNbrs())
val devActor = dm.actorRef // get underlying actor
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 28 / 30
Conclusion
Outline
1 Aggregate Computing: The Basics
2 SCAFI: Practical Aggregate Programming in Scala
3 Conclusion
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 29 / 30
Conclusion
Summary: key ideas
Aggregate programming
• A "macro" (programmingengineering) approach to CASs, formally grounded in the Field
Calculus.
• Allows to compose “emergent” phenomena & defines layers of (self-stabilizing) building blocks.
SCAFI: a Scala framework for Aggregate Programming
• Provides an internal DSL for field-based computations
• Provides an actor-based platform for building aggregate systems
Future work
• Evolve SCAFI to support scalable computations in cluster- and cloud-based systems.
• What does it take to set up a framework for adaptive execution strategies?
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 30 / 30
Conclusion
Question time
Questions?
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 31 / 30
Appendix References
References I
[BBVT08] Jacob Beal, Jonathan Bachrach, Dan Vickery, and Mark Tobenkin.
Fast self-healing gradients.
In Proceedings of the 2008 ACM symposium on Applied computing, pages 1969–1975.
ACM, 2008.
[BDU+
12] Jacob Beal, Stefan Dulman, Kyle Usbeck, Mirko Viroli, and Nikolaus Correll.
Organizing the aggregate: Languages for spatial computing.
CoRR, abs/1202.5509, 2012.
[BPV15] Jacob Beal, Danilo Pianini, and Mirko Viroli.
Aggregate Programming for the Internet of Things.
IEEE Computer, 2015.
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 32 / 30
Appendix References
References II
[CPV16] Roberto Casadei, Danilo Pianini, and Mirko Viroli.
Simulating large-scale aggregate mass with alchemist and scala.
In Maria Ganzha, Leszek Maciaszek, and Marcin Paprzycki, editors, Proceedings of the
Federated Conference on Computer Science and Information Systems (FedCSIS
2016), Gdansk, Poland, 11-14 September 2016. IEEE Computer Society Press.
To appear.
[CV16] Roberto Casadei and Mirko Viroli.
Towards aggregate programming in Scala.
In First Workshop on Programming Models and Languages for Distributed Computing,
PMLDC ’16, pages 5:1–5:7, New York, NY, USA, 2016. ACM.
[DVB16] Ferruccio Damiani, Mirko Viroli, and Jacob Beal.
A type-sound calculus of computational fields.
Science of Computer Programming, 117:17 – 44, 2016.
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 33 / 30
Appendix References
References III
[DVPB15] Ferruccio Damiani, Mirko Viroli, Danilo Pianini, and Jacob Beal.
Code mobility meets self-organisation: A higher-order calculus of computational fields.
volume 9039 of Lecture Notes in Computer Science, pages 113–128. Springer
International Publishing, 2015.
[VBDP15] Mirko Viroli, Jacob Beal, Ferruccio Damiani, and Danilo Pianini.
Efficient engineering of complex self-organising systems by self-stabilising fields.
2015.
R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 34 / 30

Más contenido relacionado

La actualidad más candente

S1 DML Syntax and Invocation
S1 DML Syntax and InvocationS1 DML Syntax and Invocation
S1 DML Syntax and InvocationArvind Surve
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?Alex Payne
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manualSami Said
 
Haskell vs. F# vs. Scala
Haskell vs. F# vs. ScalaHaskell vs. F# vs. Scala
Haskell vs. F# vs. Scalapt114
 
A Source-To-Source Approach to HPC Challenges
A Source-To-Source Approach to HPC ChallengesA Source-To-Source Approach to HPC Challenges
A Source-To-Source Approach to HPC ChallengesChunhua Liao
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOLiran Zvibel
 
JDK8 Functional API
JDK8 Functional APIJDK8 Functional API
JDK8 Functional APIJustin Lin
 
Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Christian Peel
 
HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016Ehsan Totoni
 
The D Programming Language - Why I love it!
The D Programming Language - Why I love it!The D Programming Language - Why I love it!
The D Programming Language - Why I love it!ryutenchi
 

La actualidad más candente (18)

scilab
scilabscilab
scilab
 
S1 DML Syntax and Invocation
S1 DML Syntax and InvocationS1 DML Syntax and Invocation
S1 DML Syntax and Invocation
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
Yacc
YaccYacc
Yacc
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
 
Java 8
Java 8Java 8
Java 8
 
Haskell vs. F# vs. Scala
Haskell vs. F# vs. ScalaHaskell vs. F# vs. Scala
Haskell vs. F# vs. Scala
 
A Source-To-Source Approach to HPC Challenges
A Source-To-Source Approach to HPC ChallengesA Source-To-Source Approach to HPC Challenges
A Source-To-Source Approach to HPC Challenges
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
JDK8 Functional API
JDK8 Functional APIJDK8 Functional API
JDK8 Functional API
 
OCL 2.5 plans
OCL 2.5 plansOCL 2.5 plans
OCL 2.5 plans
 
Lexyacc
LexyaccLexyacc
Lexyacc
 
Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015
 
D programming language
D programming languageD programming language
D programming language
 
HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016
 
The D Programming Language - Why I love it!
The D Programming Language - Why I love it!The D Programming Language - Why I love it!
The D Programming Language - Why I love it!
 

Destacado

Java 8 and beyond, a scala story
Java 8 and beyond, a scala storyJava 8 and beyond, a scala story
Java 8 and beyond, a scala storyittaiz
 
Six years of Scala and counting
Six years of Scala and countingSix years of Scala and counting
Six years of Scala and countingManuel Bernhardt
 
Reactive Access to MongoDB from Scala
Reactive Access to MongoDB from ScalaReactive Access to MongoDB from Scala
Reactive Access to MongoDB from ScalaHermann Hueck
 
Scala Past, Present & Future
Scala Past, Present & FutureScala Past, Present & Future
Scala Past, Present & Futuremircodotta
 
Brendan O'Bra Scala By the Schuykill
Brendan O'Bra Scala By the SchuykillBrendan O'Bra Scala By the Schuykill
Brendan O'Bra Scala By the SchuykillBrendan O'Bra
 
Microservices in Java and Scala (sfscala)
Microservices in Java and Scala (sfscala)Microservices in Java and Scala (sfscala)
Microservices in Java and Scala (sfscala)Chris Richardson
 
BDX 2016 - Tzach zohar @ kenshoo
BDX 2016 - Tzach zohar  @ kenshooBDX 2016 - Tzach zohar  @ kenshoo
BDX 2016 - Tzach zohar @ kenshooIdo Shilon
 
Macro in Scala
Macro in ScalaMacro in Scala
Macro in Scalatakezoe
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)Eugene Yokota
 

Destacado (11)

Java 8 and beyond, a scala story
Java 8 and beyond, a scala storyJava 8 and beyond, a scala story
Java 8 and beyond, a scala story
 
Six years of Scala and counting
Six years of Scala and countingSix years of Scala and counting
Six years of Scala and counting
 
Scala in Practice
Scala in PracticeScala in Practice
Scala in Practice
 
Reactive Access to MongoDB from Scala
Reactive Access to MongoDB from ScalaReactive Access to MongoDB from Scala
Reactive Access to MongoDB from Scala
 
Scala Past, Present & Future
Scala Past, Present & FutureScala Past, Present & Future
Scala Past, Present & Future
 
Brendan O'Bra Scala By the Schuykill
Brendan O'Bra Scala By the SchuykillBrendan O'Bra Scala By the Schuykill
Brendan O'Bra Scala By the Schuykill
 
Microservices in Java and Scala (sfscala)
Microservices in Java and Scala (sfscala)Microservices in Java and Scala (sfscala)
Microservices in Java and Scala (sfscala)
 
Fun[ctional] spark with scala
Fun[ctional] spark with scalaFun[ctional] spark with scala
Fun[ctional] spark with scala
 
BDX 2016 - Tzach zohar @ kenshoo
BDX 2016 - Tzach zohar  @ kenshooBDX 2016 - Tzach zohar  @ kenshoo
BDX 2016 - Tzach zohar @ kenshoo
 
Macro in Scala
Macro in ScalaMacro in Scala
Macro in Scala
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
 

Similar a Practical Aggregate Programming in Scala

Scafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsRoberto Casadei
 
Programming Actor-based Collective Adaptive Systems
Programming Actor-based Collective Adaptive SystemsProgramming Actor-based Collective Adaptive Systems
Programming Actor-based Collective Adaptive SystemsRoberto Casadei
 
Simulating Large-scale Aggregate MASs with Alchemist and Scala
Simulating Large-scale Aggregate MASs with Alchemist and ScalaSimulating Large-scale Aggregate MASs with Alchemist and Scala
Simulating Large-scale Aggregate MASs with Alchemist and ScalaDanilo Pianini
 
On Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate ComputingOn Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate ComputingRoberto Casadei
 
Aggregate Computing Platforms: Bridging the Gaps
Aggregate Computing Platforms: Bridging the GapsAggregate Computing Platforms: Bridging the Gaps
Aggregate Computing Platforms: Bridging the GapsRoberto Casadei
 
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Roberto Casadei
 
A Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsRoberto Casadei
 
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Roberto Casadei
 
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Roberto Casadei
 
Aggregate Programming in Scala
Aggregate Programming in ScalaAggregate Programming in Scala
Aggregate Programming in ScalaRoberto Casadei
 
Scala(e) to the large. Concurrent programming in Scala and relevant Frameworks
Scala(e) to the large. Concurrent programming in Scala and relevant FrameworksScala(e) to the large. Concurrent programming in Scala and relevant Frameworks
Scala(e) to the large. Concurrent programming in Scala and relevant FrameworksGianluca Aguzzi
 
Towards Aggregate Programming in Scala
Towards Aggregate Programming in ScalaTowards Aggregate Programming in Scala
Towards Aggregate Programming in ScalaRoberto Casadei
 
St Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel RSt Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel RAndrew Bzikadze
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveRoberto Casadei
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA Japan
 
On Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingRoberto Casadei
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkMarco Gaido
 
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014Roger Huang
 

Similar a Practical Aggregate Programming in Scala (20)

Scafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational Fields
 
Programming Actor-based Collective Adaptive Systems
Programming Actor-based Collective Adaptive SystemsProgramming Actor-based Collective Adaptive Systems
Programming Actor-based Collective Adaptive Systems
 
Simulating Large-scale Aggregate MASs with Alchemist and Scala
Simulating Large-scale Aggregate MASs with Alchemist and ScalaSimulating Large-scale Aggregate MASs with Alchemist and Scala
Simulating Large-scale Aggregate MASs with Alchemist and Scala
 
On Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate ComputingOn Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate Computing
 
Aggregate Computing Platforms: Bridging the Gaps
Aggregate Computing Platforms: Bridging the GapsAggregate Computing Platforms: Bridging the Gaps
Aggregate Computing Platforms: Bridging the Gaps
 
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
 
A Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive Ecosystems
 
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
 
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
 
Aggregate Programming in Scala
Aggregate Programming in ScalaAggregate Programming in Scala
Aggregate Programming in Scala
 
Scala(e) to the large. Concurrent programming in Scala and relevant Frameworks
Scala(e) to the large. Concurrent programming in Scala and relevant FrameworksScala(e) to the large. Concurrent programming in Scala and relevant Frameworks
Scala(e) to the large. Concurrent programming in Scala and relevant Frameworks
 
Towards Aggregate Programming in Scala
Towards Aggregate Programming in ScalaTowards Aggregate Programming in Scala
Towards Aggregate Programming in Scala
 
St Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel RSt Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel R
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate Perspective
 
Scala+data
Scala+dataScala+data
Scala+data
 
SCALA - Functional domain
SCALA -  Functional domainSCALA -  Functional domain
SCALA - Functional domain
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読み
 
On Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate Programming
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache Spark
 
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014
Intro to Apache Spark and Scala, Austin ACM SIGKDD, 7/9/2014
 

Más de Roberto Casadei

Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Roberto Casadei
 
A Presentation of My Research Activity
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research ActivityRoberto Casadei
 
Aggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewRoberto Casadei
 
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceRoberto Casadei
 
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Roberto Casadei
 
FScaFi: A Core Calculus for Collective Adaptive Systems Programming
FScaFi: A Core Calculus for Collective Adaptive Systems ProgrammingFScaFi: A Core Calculus for Collective Adaptive Systems Programming
FScaFi: A Core Calculus for Collective Adaptive Systems ProgrammingRoberto Casadei
 
6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive SystemsRoberto Casadei
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsRoberto Casadei
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsRoberto Casadei
 
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Roberto Casadei
 
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Roberto Casadei
 
Testing: an Introduction and Panorama
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and PanoramaRoberto Casadei
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTRoberto Casadei
 
Aggregate Processes in Field Calculus
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field CalculusRoberto Casadei
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless ComputingRoberto Casadei
 
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Roberto Casadei
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an OverviewRoberto Casadei
 
Akka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionRoberto Casadei
 
Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an IntroductionRoberto Casadei
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTRoberto Casadei
 

Más de Roberto Casadei (20)

Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
 
A Presentation of My Research Activity
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research Activity
 
Aggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an Overview
 
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
 
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
 
FScaFi: A Core Calculus for Collective Adaptive Systems Programming
FScaFi: A Core Calculus for Collective Adaptive Systems ProgrammingFScaFi: A Core Calculus for Collective Adaptive Systems Programming
FScaFi: A Core Calculus for Collective Adaptive Systems Programming
 
6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated Systems
 
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
 
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
 
Testing: an Introduction and Panorama
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and Panorama
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoT
 
Aggregate Processes in Field Calculus
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field Calculus
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless Computing
 
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
 
Akka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an Introduction
 
Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an Introduction
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
 

Último

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Practical Aggregate Programming in Scala

  • 1. Practical Aggregate Programming in Scala Roberto Casadei PhD Student in CS&Eng roby.casadei@unibo.it Department of Computer Science and Engineering University of Bologna Student talk at Scala Symposium, Amsterdam 2016 Slides available at http://www.slideshare.net/RobertoCasadei/presentations Sample code at https://bitbucket.org/metaphori/scafi-tutorial R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 1 / 30
  • 2. Outline 1 Aggregate Computing: The Basics 2 SCAFI: Practical Aggregate Programming in Scala 3 Conclusion R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 2 / 30
  • 3. Aggregate Computing: The Basics Outline 1 Aggregate Computing: The Basics 2 SCAFI: Practical Aggregate Programming in Scala 3 Conclusion R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 3 / 30
  • 4. Aggregate Computing: The Basics Problem: design/programming CASs Collective/Complex Adaptive Systems (CASs) Structure: Environment + (Mobile, Large-scale) Networks of { people + devices } Global interpretation: embedded devices collectively form a “diffused” computational system R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 4 / 30
  • 5. Aggregate Computing: The Basics An approach to CAS development Issues ⇒ approach • Large-scale ⇒ decentralised coordination • Situatedness + distributed autonomy ⇒ substantial unpredictability ⇒ self-* • Complex collective behavior ⇒ good abstractions, layered approach, compositionality Shifting the mindset: from local to global • Declarativeness and the global viewpoint • Crowd-aware services • Failure recovery of enterprise services • Distributed monitoring and reacting (e.g., temperature, fire) • Expected global behavior vs. traditional device-centric interface ⇒ Aggregate Programming [BPV15]: a paradigm for programming whole aggregates of devices. R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 5 / 30
  • 6. Aggregate Computing: The Basics Aggregate programming [BPV15] From the local/device-centric viewpoint to the global/aggregate viewpoint Aggregate programming: what Goal: programming the collective behaviour of aggregates (of devices) ⇒ global-to-local Aggregate programming: how Prominent approach (generalizing over several prior approaches and strategies [BDU+ 12]) founded on field calculus and self-org patterns • Computational fields as unifying abstraction of local/global viewpoints R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 6 / 30
  • 7. Aggregate Computing: The Basics Aggregate Programming Stack R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 7 / 30
  • 8. Aggregate Computing: The Basics Aggregate (computing) systems & Execution model Structure ⇒ (network/graph) • A set of devices (aka nodes/points/things). • Each device is able to communicate with a subset of devices known as its neighbourhood. Dynamics Each device is given the same aggregate program and works at async / partially-sync rounds: (1) Retrieve context ⇐ Messages from neighbours ⇐ Sensor values (2) Aggregate program execution ⇒ export (a tree-like repr of computation) + output (result of last expr in body) (3) Broadcast export to neighbourhood (4) Execute actuators R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 8 / 30
  • 9. SCAFI: Practical Aggregate Programming in Scala Outline 1 Aggregate Computing: The Basics 2 SCAFI: Practical Aggregate Programming in Scala 3 Conclusion R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 9 / 30
  • 10. SCAFI: Practical Aggregate Programming in Scala SCAFI: Scala with Computational Fields Goal: bring Aggregate Computing to the field of mainstream software development What SCAFI [CV16] is an integrated framework for building systems with aggregate programming. • Scala-internal DSL for expressing aggregate computations. • Linguistic support + execution support (interpreter/VM) • Correct, complete, efficient impl. of the Higher-Order Field Calculus semantics [DVPB15] • Distributed platform for execution of aggregate systems. • Support for multiple architectural styles and system configurations. • Actor-based implementation (based on Akka). Where • https://bitbucket.org/scafiteam/scafi libraryDependencies += "it.unibo.apice.scafiteam" % "scafi-core_2.11" % "0.1.0" // on Maven Central R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 10 / 30
  • 11. SCAFI: Practical Aggregate Programming in Scala Computational fields [DVB16] • (Abstract interpretation) Mapping space-time to computational objects • (Concrete interpretation) Mapping devices to values: φ : δ → • “Distributed” data structure working as the global abstraction • The bridge abstraction between local behavior and global behavior Discrete systems as an approximation of spacetime R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 11 / 30
  • 12. SCAFI: Practical Aggregate Programming in Scala Field/aggregate computations Global viewpoint • Aggregate interpretation • Natural/denotational semantics • Program: computation over whole fields • Output (at a given time): system-wide snapshot of a computational field • Geometric view: properties of collections of points Local viewpoint • Device-centric interpretation • Operational semantics • Program: steps of a single device • Output (at a given time): latest value yielded by the device • Geometric view: properties of a single point R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 12 / 30
  • 13. SCAFI: Practical Aggregate Programming in Scala So, what is an aggregate program? • The global program – "Local programs" obtained via global-to-local mapping • May take the form of field calculus programs (in the representation given by some PL) – Actually, the field calculus is like FJ for Java, or the lambda calculus for Haskell • An aggregate program consists of 1) A set of function definitions 2) A body of expressions. • Example: an aggregate program in SCAFI class MyProgram extends AggregateProgram with MyAPI { def isSource = sense[Boolean]("source") // Entry point for execution override def main() = gradient(isSource) } – Each device of the aggregate system is given an instance of MyProgram. – Each device repeatedly runs the main method at async rounds of execution. R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 13 / 30
  • 14. SCAFI: Practical Aggregate Programming in Scala Computing with fields Expressing aggregate/field computations in SCAFI trait Constructs { def rep[A](init: A)(fun: (A) => A): A def nbr[A](expr: => A): A def foldhood[A](init: => A)(acc: (A,A)=>A)(expr: => A): A def aggregate[A](f: => A): A // Not primitive, but foundational def sense[A](name: LSNS): A def nbrvar[A](name: NSNS): A def branch[A](cond: => Boolean)(th: => A)(el: => A): A } • Mechanisms for context-sensitiveness: nbr, nbrvar, sense • Mechanisms for field evolution: rep • Mechanisms for interaction: nbr • Mechanisms for field domain restriction and partitioning: aggregate, branch • Reference formal system: field calculus [DVB16, DVPB15] R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 14 / 30
  • 15. SCAFI: Practical Aggregate Programming in Scala Simple fields 0 (x)=>x+1 true t<0,1> Constant, uniform field: 5 – Local view: evaluates to 5 in the context of a single device – Global view: yields a uniform constant field that holds 5 at any point (i.e., at any device) Constant, non-uniform field: mid() – mid() is a built-in function that returns the ID of the running device R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 15 / 30
  • 16. SCAFI: Practical Aggregate Programming in Scala rep: dynamically evolving fields rep 0 (x)=>x+1 t v0 t v1 .. rep(0){(x)=>x+1} // Signature: def rep[A](init: A)(fun: (A) => A): A // Initially 0; state is incremented at each round rep(0){ _+1 } – Notice: the frequency of computation can vary over time and from device to device – In general, the resulting field will be heterogeneous in time and space R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 16 / 30
  • 17. SCAFI: Practical Aggregate Programming in Scala nbr: interaction, communication, observation nbr de nbr{e} φd=[d1→v1,..,dn→vn] – Local view: nbr returns a field from neighbors to their corresponding value of the given expr e – Global view: a field of fields – Needs to be reduced using a *hood operation – foldhood works by retrieving the value of expr for each neighbour and then folding over the resulting structure as you’d expect from FP. // Signature: def nbr[A](expr: => A): A // Signature: def foldhood[A](init: => A)(acc: (A,A)=>A)(expr: => A): A foldhood(0)(_+_){ nbr{1} } R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 17 / 30
  • 18. SCAFI: Practical Aggregate Programming in Scala Context-sensitiveness and sensors Local context: 1) The export of the previous computation 2) Messages received from neighbours 3) Values perceived from the physical/software environment Sensing // Query a local sensor sense[Double]("temperature") // Compute the maximum distance from neighbours foldhood(Double.MinValue)(max(_,_)){ // Also: maxHood {...} nbrvar[Double](NBR_RANGE_NAME) } – nbr queries a local sensor – nbrvar queries a "neighbouring sensor" (a sort of "environmental probe") R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 18 / 30
  • 19. SCAFI: Practical Aggregate Programming in Scala Field domain restriction Alignment • Aggregate computations can be represented as a trees • Device exports are "paths" along these trees • When two devices execute the same tree node, they are said to be aligned • Interaction is possible only between aligned devices Use cases for branch • Partitioning the space into subspaces performing subcomputations • Regulating admissible interactions (i.e., further restricting the neighbourhood) branch(sense[Boolean]("flag")){ compute(...) // sub-computation }{ Double.MaxValue // stable value (i.e., not computing) } R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 19 / 30
  • 20. SCAFI: Practical Aggregate Programming in Scala Functions Two kinds of functions in SCAFI: 1) "Normal" Scala functions: serve as units for encapsulating behavior/logic def foldhoodMinus[A](init: => A)(acc: (A,A) => A)(ex: => A): A = foldhood(init)(acc){ mux(mid()==nbr(mid())){ init }{ ex } } def isSource = sense[Boolean]("source") 2) First-class "aggregate" functions [DVPB15] – which also work as units for alignment def branch[A](cond: => Boolean)(th: => A)(el: => A): A = mux(cond, ()=>aggregate{ th }, ()=>aggregate{ el })() R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 20 / 30
  • 21. SCAFI: Practical Aggregate Programming in Scala Example: the gradient [BBVT08] def nbrRange = nbrvar[Double](NBR_RANGE_NAME) def gradient(source: Boolean): Double = rep(Double.PositiveInfinity){ distance => mux(source) { 0.0 }{ minHood { nbr{distance} + nbrRange } } } R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 21 / 30
  • 22. SCAFI: Practical Aggregate Programming in Scala Example: the channel I R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 22 / 30
  • 23. SCAFI: Practical Aggregate Programming in Scala Example: the channel II Each device is given the same aggregate program: class ChannelProgram extends AggregateProgram with ChannelAPI { def main = channel(isSource, isDestination, width) } def channel(src: Boolean, dest: Boolean, width: Double) = distanceTo(src) + distanceTo(dest) <= distBetween(src, dest) + width R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 23 / 30
  • 24. SCAFI: Practical Aggregate Programming in Scala Example: the channel III trait ChannelAPI extends Language with Builtins { def channel(src: Boolean, dest: Boolean, width: Double) = distanceTo(src) + distanceTo(dest) <= distBetween(src, dest) + width def G[V:OB](src: Boolean, field: V, acc: V=>V, metric: =>Double): V = rep( (Double.MaxValue, field) ){ dv => mux(src) { (0.0, field) } { minHoodMinus { val (d, v) = nbr { (dv._1, dv._2) } (d + metric, acc(v)) } } }._2 def broadcast[V:OB](source: Boolean, field: V): V = G[V](source, field, x=>x, nbrRange()) def distanceTo(source: Boolean): Double = G[Double](source, 0, _ + nbrRange(), nbrRange()) def distBetween(source: Boolean, target: Boolean): Double = broadcast(source, distanceTo(target)) def nbrRange(): Double = nbrvar[Double](NBR_RANGE_NAME) def isSource = sense[Boolean]("source"); def isDestination = sense[Boolean]("destination") } R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 24 / 30
  • 25. SCAFI: Practical Aggregate Programming in Scala Scaling with complexity General coordination operators [VBDP15] • Gradient-cast: accumulates values “outward” along a gradient starting from source nodes. def G[V:OB](src: Boolean, init: V, acc: V=>V, metric: =>Double): V • Converge-cast: collects data distributed across space “inward” by accumulating values from edge nodes to sink nodes down a “potential” field. def C[V:OB](potential: V, acc: (V,V)=>V, local: V, Null: V): V • Time-decay: supports information summarisation across time. def T[V:Numeric](initial: V, floor: V, decay: V=>V): V • Sparse-choice: supports creation of partitions and selection of sparse subsets of devices in space def S(grain: Double, metric: => Double): Boolean R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 25 / 30
  • 26. SCAFI: Practical Aggregate Programming in Scala A case study: crowd engineering [CPV16] val (high,low,none) = (2,1,0) // crowd level def crowdWarning(p: Double, r: Double, warn: Double, t: Double): Boolean = distanceTo(crowdTracking(p,r,t) == high) < warn def crowdTracking(p: Double, r: Double, t: Double) = { val crowdRgn = recentTrue(densityEst(p, r)>1.08, t) branch(crowdRgn){ dangerousDensity(p, r) }{ none } } def dangerousDensity(p: Double, r: Double) = { val mr = managementRegions(r*2, () => { nbrRange }) val danger = average(mr, densityEst(p, r)) > 2.17 && summarize(mr, (_:Double)+(_:Double), 1 / p, 0) > 300 mux(danger){ high }{ low } } // Auxiliary functions def recentTrue(state: Boolean, memTime: Double): Boolean def managementRegions(grain: Double, metric: => Double): Boolean = S(gran,metric) def densityEst(p: Double, range: Double): Double def summarize(sink: Boolean, acc: (Double,Double)=>Double, local: Double, Null: Double): Double def average(sink: Boolean, value: Double): Double R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 26 / 30
  • 27. SCAFI: Practical Aggregate Programming in Scala Quick platform setup // STEP 1: CHOOSE INCARNATION import it.unibo.scafi.incarnations.{ BasicActorP2P => Platform } // STEP 2: DEFINE AGGREGATE PROGRAM SCHEMA class Demo_AggregateProgram extends Platform.AggregateProgram { override def main(): Any = foldhood(0){_ + _}(1) } // STEP 3: DEFINE MAIN PROGRAM object Demo_MainProgram extends Platform.CmdLineMain 1) Demo_MainProgram -h 127.0.0.1 -p 9000 -e 1:2,4,5;2;3 --subsystems 127.0.0.1:9500:4:5 --program "demos.Demo_AggregateProgram" 2) Demo_MainProgram -h 127.0.0.1 -p 9500 -e 4;5:4 --program "demos.Demo_AggregateProgram" R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 27 / 30
  • 28. SCAFI: Practical Aggregate Programming in Scala Manual node setup // STEP 1: CHOOSE INCARNATION import scafi.incarnations.{ BasicActorP2P => Platform } import Platform.{AggregateProgram,Settings,PlatformConfig} // STEP 2: DEFINE AGGREGATE PROGRAM SCHEMA class Program extends AggregateProgram with CrowdAPI { // Specify a "dangerous density" aggregate computation override def main(): Any = crowdWarning(...) } // STEP 3: PLATFORM SETUP val settings = Settings() val platform = PlatformConfig.setupPlatform(settings) // STEP 4: NODE SETUP val sys = platform.newAggregateApplication() val dm = sys.newDevice(id = Utils.newId(), program = Program, neighbours = Utils.discoverNbrs()) val devActor = dm.actorRef // get underlying actor R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 28 / 30
  • 29. Conclusion Outline 1 Aggregate Computing: The Basics 2 SCAFI: Practical Aggregate Programming in Scala 3 Conclusion R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 29 / 30
  • 30. Conclusion Summary: key ideas Aggregate programming • A "macro" (programmingengineering) approach to CASs, formally grounded in the Field Calculus. • Allows to compose “emergent” phenomena & defines layers of (self-stabilizing) building blocks. SCAFI: a Scala framework for Aggregate Programming • Provides an internal DSL for field-based computations • Provides an actor-based platform for building aggregate systems Future work • Evolve SCAFI to support scalable computations in cluster- and cloud-based systems. • What does it take to set up a framework for adaptive execution strategies? R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 30 / 30
  • 31. Conclusion Question time Questions? R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 31 / 30
  • 32. Appendix References References I [BBVT08] Jacob Beal, Jonathan Bachrach, Dan Vickery, and Mark Tobenkin. Fast self-healing gradients. In Proceedings of the 2008 ACM symposium on Applied computing, pages 1969–1975. ACM, 2008. [BDU+ 12] Jacob Beal, Stefan Dulman, Kyle Usbeck, Mirko Viroli, and Nikolaus Correll. Organizing the aggregate: Languages for spatial computing. CoRR, abs/1202.5509, 2012. [BPV15] Jacob Beal, Danilo Pianini, and Mirko Viroli. Aggregate Programming for the Internet of Things. IEEE Computer, 2015. R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 32 / 30
  • 33. Appendix References References II [CPV16] Roberto Casadei, Danilo Pianini, and Mirko Viroli. Simulating large-scale aggregate mass with alchemist and scala. In Maria Ganzha, Leszek Maciaszek, and Marcin Paprzycki, editors, Proceedings of the Federated Conference on Computer Science and Information Systems (FedCSIS 2016), Gdansk, Poland, 11-14 September 2016. IEEE Computer Society Press. To appear. [CV16] Roberto Casadei and Mirko Viroli. Towards aggregate programming in Scala. In First Workshop on Programming Models and Languages for Distributed Computing, PMLDC ’16, pages 5:1–5:7, New York, NY, USA, 2016. ACM. [DVB16] Ferruccio Damiani, Mirko Viroli, and Jacob Beal. A type-sound calculus of computational fields. Science of Computer Programming, 117:17 – 44, 2016. R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 33 / 30
  • 34. Appendix References References III [DVPB15] Ferruccio Damiani, Mirko Viroli, Danilo Pianini, and Jacob Beal. Code mobility meets self-organisation: A higher-order calculus of computational fields. volume 9039 of Lecture Notes in Computer Science, pages 113–128. Springer International Publishing, 2015. [VBDP15] Mirko Viroli, Jacob Beal, Ferruccio Damiani, and Danilo Pianini. Efficient engineering of complex self-organising systems by self-stabilising fields. 2015. R. Casadei (Università di Bologna) Practical Aggregate Programming in Scala Scala Symposium ’16 34 / 30