SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Protelis: Practical Aggregate Programming
Danilo Pianini, Mirko Viroli
{danilo.pianini,mirko.viroli}@unibo.it
Jacob Beal
jakebeal@bbn.com
Universit`a di Bologna
Italy
Raytheon BBN Technologies
United States of America
Symposium on Applied Computing 2015
Salamanca
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 1 / 37
Outline You’ll soon have your God, and you’ll make it with your hands.
1 Aggregate Programming
Local to Global
From Proto to Field Calculus
2 Protelis
Language features
Simulator and Runtime
Examples
3 Conclusion and Future work
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 2 / 37
Aggregate Programming
Outline
1 Aggregate Programming
Local to Global
From Proto to Field Calculus
2 Protelis
Language features
Simulator and Runtime
Examples
3 Conclusion and Future work
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 3 / 37
Aggregate Programming Local to Global
Our stage
Large number of devices or services
Possibly situated
Capable of sensing, computing, communicating
Behaviour must be coordinated to achieve a global goal
Pervasive Continuum or (pick the one you prefer):
Pervasive computing
Smart cities
Internet of things
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 4 / 37
Aggregate Programming Local to Global
Classic approach
Local to global
Complex global behaviour
Simple local behaviour
The whole is more than the sum of the parts
Interaction is key
Nature inspiration
Several systems use nature as inspiration:
physical particles [MZ09]
chemical reactions [ZCF+11]
ants, termites and other social insects [TM03]
Very brief list! There are many more.
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 5 / 37
Aggregate Programming Local to Global
Nice properties and hard challenges
The beauty
High resilience and fault tolerance
Self adaptation
Openness
Self healing
The beast
Local to global is hard to engineer
The desired functionality happens at the aggregate level
It is very difficult to design the local behaviour in such a way that the
interaction of many of them produces the desired global behaviour
Many attempts, but no good engineering processes to safely design
such systems
Often, development becomes a try-and-simulate loop
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 6 / 37
Aggregate Programming Local to Global
Collective to local
Device&
Neighborhood&
Manifold&
Device&
Neighborhood&
Network&
Possible solution
Create a language that allows to express collective properties
Create a runtime that can run such programs
Possibly, also create a tool to test programs prior to deployment
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 7 / 37
Aggregate Programming From Proto to Field Calculus
Existing languages
MIT Proto [BB06] is the most known and successful
Developed at MIT and maintained at BBN Technologies
Functional language, LISP-like syntax (I know you hate it too)
All devices run the same program
Computation happens in rounds:
Every device sleeps for some time
Processes the messages received from the neighbours
Executes its program
Sends all the neighbours its result
Complex operational semantics
Difficult to maintain and extend
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 8 / 37
Aggregate Programming From Proto to Field Calculus
Field Calculus
A “distillate” of Proto
Provides a lightweight operational semantics [VDB13]
((((LISP-like syntax))))
Still a functional language
Simple enough to formally prove properties, powerful enough to be
universal (proved!)
Theoretical object, no runtime nor simulation tool provided
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 9 / 37
Protelis
Outline
1 Aggregate Programming
Local to Global
From Proto to Field Calculus
2 Protelis
Language features
Simulator and Runtime
Examples
3 Conclusion and Future work
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 10 / 37
Protelis Language features
Ordinary language features
Functional language
Same operational semantics of the field calculus
C-family syntax with infix operators
Java interoperability: static methods imports and calls, method
invocation with dynamic binding
Higher order functions (functions as arguments, lambdas)
Dynamic code
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 11 / 37
Protelis Language features
Field calculus operators
rep
defines a locally visible variable
Retains its value at each computation round
Enables stateful computation
nbr
Builds a field
Map device →value
Includes self
*hood built-in functions summarize the field back to ordinary
expressions
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 12 / 37
Protelis Language features
Branching
mux / else
Functional inclusive “multiplexing” branching
Evaluates both branches, then returns the correct one
nbrs in branches can “align”
if / else
Exclusive branching: nbrs in different branches do not “align”
Network gets partitioned into two regions
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 13 / 37
Protelis Language features
Code example
def count() {
rep(x<-0) { x + 1 }
}
def maxh(field) { maxHood(nbr{field}) }
def distanceTo(source) {
rep (d <- Infinity) {
mux (source) { 0 } else { minHood(nbr{d} + nbrRange) }
}
}
def distanceToWithObstacle(source, obstacle) {
if (obstacle) { Infinity } else { distanceTo(source) }
}
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 14 / 37
Protelis Simulator and Runtime
Architecture
Implementation, distribution
Based on Xtext
Eclipse plugin
Integrated with Alchemist [PMV13]
Stand-alone framework for real devices
Write once, run everywhere — evolved :)
Now distributed through Maven Central a
a
artifact: it.unibo.alchemist:alchemist.protelis
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 15 / 37
Protelis Simulator and Runtime
Abstract architecture
Protelis)Parser)
Protelis)Device)
Environment)
Variables)
Protelis)
Interpreter)
Protelis)Program)
Other&
Devices&
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 16 / 37
Protelis Simulator and Runtime
Simulation runtime architecture
Simulated*Device*
Protelis*Parser*
Protelis*Device*
Environment*
Variables*
Protelis*
Interpreter*
Protelis)Program)
Simulated*
Environment*
Simula8on*
Builder*
Simula/on)Script)
Alchemist*
Simulator*
Simulated*
Network*
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 17 / 37
Protelis Simulator and Runtime
Standalone runtime architecture
Daemon'Device'
Protelis'Parser'
Protelis'Device'
Environment'
Variables'
Protelis'
Interpreter'
Protelis)Program)
Service'
Manager'
Daemon'
Networked'
Service'
Start/Stop'
Signals'
Status,'
Sockets'
Other&
Services&
Other&
Managers&
Enterprise&
Server&
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 18 / 37
Protelis Examples
Rendezvous at a Mass Event
Problem
Large public event
People want to rendezvous with a companion
Cloud-based services may be unreachable
Possible solution with Protelis
Simple P2P geometric calculation across network
Testbed
Simulated in Alchemist
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 19 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 20 / 37
Protelis Examples
Rendezvous at a Mass Event
// Follow the gradient of a potential field down from a source
def descend(source, potential) {
rep(path <- source) {
let nextStep = minHood(nbr([potential, self.getId()]));
if (nextStep.size() > 1) {
let candidates = nbr([nextStep.get(1), path]);
source || anyHood([self.getId(), true] == candidates)
} else {
source
}
}
}
def rendezvous(person1, person2) {
descend (person1 == owner, distanceTo(person2 == owner))
}
// Example of using rendezvous
rendezvous("Alice", "Bob");
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 21 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 22 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 23 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 24 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 25 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 26 / 37
Protelis Examples
Rendezvous at a Mass Event
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 27 / 37
Protelis Examples
Network Service Management
Problem
Legacy or poorly coded services do not respond gracefully to the
failure of their dependencies
Risk of inconsistent state and of being unable to resume correctly
when the failed dependency is back online
Possible solution with Protelis
Attach a Protelis daemon to each service, which watches its status
and communicates with other daemons to coordinate shutdown and
restart
Testbed
Implemented on a network of EmuLab servers
Services are emulated by query-response networking Java programs
they “hang” when triggered or when their queries consistently fail
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 28 / 37
Protelis Examples
Network Service Management
External)
Portals)
Supplies)
Database)
Financial)
Database)
Logis7cs)
Server)
Backup)
Server)
B2B)Catalog)
Server)
Interac(on*
Dependency*
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 29 / 37
Protelis Examples
Network Service Management
import it.unibo.alchemist.language.protelis.datatype.Tuple.*
import com.bbn.a3.distributedrestart.DaemonNode.*
// Compare required and available services
let nbr_set = unionHood(nbr([serviceID]));
let nbr_missing = dependencies.subtract(nbr_set);
let nbr_required = #contains(dependencies, nbr(serviceID));
let nbr_down = nbr(managedServiceStatus=="hung" || managedServiceStatus=="stop");
// Is service currently safe to run?
let problem = anyHood(nbr_down && nbr_required) || !nbr_missing.isEmpty();
// Take managed service up and down accordingly
if (managedServiceStatus == "run" && problem) {
#stopProcess(managedService);
} else {
if (managedServiceStatus=="stop" && !problem) {
#startProcess(managedService);
} else {
managedServiceStatus
}
}
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 30 / 37
Protelis Examples
Network Service Management
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 31 / 37
Conclusion and Future work
Outline
1 Aggregate Programming
Local to Global
From Proto to Field Calculus
2 Protelis
Language features
Simulator and Runtime
Examples
3 Conclusion and Future work
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 32 / 37
Conclusion and Future work
Conclusion and Future Work
Conclusion
Universality and coherence by building atop the field calculus
Accessibility, portability and ease of integration by Java
interoperability
Important component of the toolchain necessary for using aggregate
programming in practice
Future work
Development is very active
Next step: use Protelis to build a library of reusable, high-level
building blocks for distributed applications.
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 33 / 37
References
References I
Jacob Beal and Jonathan Bachrach.
Infrastructure for engineered emergence on sensor/actuator networks.
IEEE Intelligent Systems, 21(2):10–19, 2006.
Marco Mamei and Franco Zambonelli.
Programming pervasive and mobile computing applications: The tota approach.
ACM Trans. Softw. Eng. Methodol., 18(4):1–56, 2009.
Danilo Pianini, Sara Montagna, and Mirko Viroli.
Chemical-oriented simulation of computational systems with Alchemist.
Journal of Simulation, 2013.
Robert Tolksdorf and Ronaldo Menezes.
Using swarm intelligence in linda systems.
In Andrea Omicini, Paolo Petta, and Jeremy Pitt, editors, ESAW, volume 3071 of Lecture
Notes in Computer Science, pages 49–65. Springer, 2003.
Mirko Viroli, Ferruccio Damiani, and Jacob Beal.
A calculus of computational fields.
In Carlos Canal and Massimo Villari, editors, Advances in Service-Oriented and Cloud
Computing, volume 393 of Communications in Computer and Information Science, pages
114–128. Springer Berlin Heidelberg, 2013.
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 34 / 37
References
References II
Franco Zambonelli, Gabriella Castelli, Laura Ferrari, Marco Mamei, Alberto Rosi, Giovanna
Di Marzo, Matteo Risoldi, Akla-Esso Tchao, Simon Dobson, Graeme Stevenson, Yuan Ye,
Elena Nardini, Andrea Omicini, Sara Montagna, Mirko Viroli, Alois Ferscha, Sascha
Maschek, and Bernhard Wally.
Self-aware pervasive service ecosystems.
Procedia Computer Science, 7:197–199, December 2011.
Proceedings of the 2nd European Future Technologies Conference and Exhibition 2011
(FET 11).
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 35 / 37
References
Protelis: Practical Aggregate Programming
Danilo Pianini, Mirko Viroli
{danilo.pianini,mirko.viroli}@unibo.it
Jacob Beal
jakebeal@bbn.com
Universit`a di Bologna
Italy
Raytheon BBN Technologies
United States of America
Symposium on Applied Computing 2015
Salamanca
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 36 / 37
References
Simpler semantics
Proto Field calculus
Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 37 / 37

Weitere ähnliche Inhalte

Ähnlich wie Protelis: Practical Aggregate Programming - Symposium on Applied Computing (SAC), 2015

Practical Aggregate Programming with Protelis @ SASO2017
Practical Aggregate Programming with Protelis @ SASO2017Practical Aggregate Programming with Protelis @ SASO2017
Practical Aggregate Programming with Protelis @ SASO2017Danilo Pianini
 
Towards a Foundational API for Resilient Distributed Systems Design
Towards a Foundational API for Resilient Distributed Systems DesignTowards a Foundational API for Resilient Distributed Systems Design
Towards a Foundational API for Resilient Distributed Systems DesignDanilo Pianini
 
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...Danilo Pianini
 
Computational Fields meet Augmented Reality: Perspectives and Challenges
Computational Fields meet Augmented Reality: Perspectives and ChallengesComputational Fields meet Augmented Reality: Perspectives and Challenges
Computational Fields meet Augmented Reality: Perspectives and ChallengesDanilo Pianini
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationDanilo 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
 
The Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemThe Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemNicole Wells
 
Prins Bio Lib Bosc 2009
Prins Bio Lib Bosc 2009Prins Bio Lib Bosc 2009
Prins Bio Lib Bosc 2009bosc
 
Practical Groovy Domain-Specific Languages
Practical Groovy Domain-Specific LanguagesPractical Groovy Domain-Specific Languages
Practical Groovy Domain-Specific LanguagesGuillaume Laforge
 
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...PARC, a Xerox company
 
Open Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
Open Developer Platform: What Is It and Why Should I Care? Maurizio PillituOpen Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
Open Developer Platform: What Is It and Why Should I Care? Maurizio PillituSymphony Software Foundation
 
openEQUELLA Q3 2019 Quarterly Briefing
openEQUELLA Q3 2019 Quarterly Briefing openEQUELLA Q3 2019 Quarterly Briefing
openEQUELLA Q3 2019 Quarterly Briefing ChrisBeach22
 
Biopython Project Update 2013
Biopython Project Update 2013Biopython Project Update 2013
Biopython Project Update 2013pjacock
 
UPC and OpenMP Parallel Programming and Analysis in PTP with CDT
UPC and OpenMP Parallel Programming and Analysis in PTP with CDTUPC and OpenMP Parallel Programming and Analysis in PTP with CDT
UPC and OpenMP Parallel Programming and Analysis in PTP with CDTbethtib
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/AopESUG
 
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeatureBlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeatureCocoaHeads France
 
L1-L2.Introduction to Programming and Python Basics.pptx
L1-L2.Introduction to Programming and Python Basics.pptxL1-L2.Introduction to Programming and Python Basics.pptx
L1-L2.Introduction to Programming and Python Basics.pptxDeepjyotiChoudhury4
 
uPortal Q2 2018 OSS Briefing
uPortal Q2 2018 OSS BriefinguPortal Q2 2018 OSS Briefing
uPortal Q2 2018 OSS BriefingUnicon, Inc.
 

Ähnlich wie Protelis: Practical Aggregate Programming - Symposium on Applied Computing (SAC), 2015 (20)

Practical Aggregate Programming with Protelis @ SASO2017
Practical Aggregate Programming with Protelis @ SASO2017Practical Aggregate Programming with Protelis @ SASO2017
Practical Aggregate Programming with Protelis @ SASO2017
 
Towards a Foundational API for Resilient Distributed Systems Design
Towards a Foundational API for Resilient Distributed Systems DesignTowards a Foundational API for Resilient Distributed Systems Design
Towards a Foundational API for Resilient Distributed Systems Design
 
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
 
Computational Fields meet Augmented Reality: Perspectives and Challenges
Computational Fields meet Augmented Reality: Perspectives and ChallengesComputational Fields meet Augmented Reality: Perspectives and Challenges
Computational Fields meet Augmented Reality: Perspectives and Challenges
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
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
 
The Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemThe Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing Problem
 
Prins Bio Lib Bosc 2009
Prins Bio Lib Bosc 2009Prins Bio Lib Bosc 2009
Prins Bio Lib Bosc 2009
 
Slimfast
SlimfastSlimfast
Slimfast
 
Practical Groovy Domain-Specific Languages
Practical Groovy Domain-Specific LanguagesPractical Groovy Domain-Specific Languages
Practical Groovy Domain-Specific Languages
 
HPC Workbench Presentation
HPC Workbench PresentationHPC Workbench Presentation
HPC Workbench Presentation
 
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...
CCNxCon2012: Session 6: Simulation Platform for Content Centric Networks Prot...
 
Open Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
Open Developer Platform: What Is It and Why Should I Care? Maurizio PillituOpen Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
Open Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
 
openEQUELLA Q3 2019 Quarterly Briefing
openEQUELLA Q3 2019 Quarterly Briefing openEQUELLA Q3 2019 Quarterly Briefing
openEQUELLA Q3 2019 Quarterly Briefing
 
Biopython Project Update 2013
Biopython Project Update 2013Biopython Project Update 2013
Biopython Project Update 2013
 
UPC and OpenMP Parallel Programming and Analysis in PTP with CDT
UPC and OpenMP Parallel Programming and Analysis in PTP with CDTUPC and OpenMP Parallel Programming and Analysis in PTP with CDT
UPC and OpenMP Parallel Programming and Analysis in PTP with CDT
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/Aop
 
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeatureBlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
 
L1-L2.Introduction to Programming and Python Basics.pptx
L1-L2.Introduction to Programming and Python Basics.pptxL1-L2.Introduction to Programming and Python Basics.pptx
L1-L2.Introduction to Programming and Python Basics.pptx
 
uPortal Q2 2018 OSS Briefing
uPortal Q2 2018 OSS BriefinguPortal Q2 2018 OSS Briefing
uPortal Q2 2018 OSS Briefing
 

Mehr von Danilo Pianini

Time fluid field-based Coordination
Time fluid field-based CoordinationTime fluid field-based Coordination
Time fluid field-based CoordinationDanilo Pianini
 
Versioning and License selection
Versioning and License selectionVersioning and License selection
Versioning and License selectionDanilo Pianini
 
Enforce reproducibility: dependency management and build automation
Enforce reproducibility: dependency management and build automationEnforce reproducibility: dependency management and build automation
Enforce reproducibility: dependency management and build automationDanilo Pianini
 
Productive parallel teamwork: Decentralized Version Control Systems
Productive parallel teamwork: Decentralized Version Control SystemsProductive parallel teamwork: Decentralized Version Control Systems
Productive parallel teamwork: Decentralized Version Control SystemsDanilo Pianini
 
Continuous integration and delivery
Continuous integration and deliveryContinuous integration and delivery
Continuous integration and deliveryDanilo Pianini
 
Engineering computational ecosystems (2nd year PhD seminar)
Engineering computational ecosystems (2nd year PhD seminar)Engineering computational ecosystems (2nd year PhD seminar)
Engineering computational ecosystems (2nd year PhD seminar)Danilo Pianini
 
From Engineer to Alchemist, There and Back Again: An Alchemist Tale
From Engineer to Alchemist, There and Back Again: An Alchemist TaleFrom Engineer to Alchemist, There and Back Again: An Alchemist Tale
From Engineer to Alchemist, There and Back Again: An Alchemist TaleDanilo Pianini
 
SAPERE WP1 Alchemist status at 02/2013
SAPERE WP1 Alchemist status at 02/2013SAPERE WP1 Alchemist status at 02/2013
SAPERE WP1 Alchemist status at 02/2013Danilo Pianini
 
Engineering Computational Ecosystems
Engineering Computational EcosystemsEngineering Computational Ecosystems
Engineering Computational EcosystemsDanilo Pianini
 
Recipes for Sabayon: cook your own Linux distro within two hours
Recipes for Sabayon: cook your own Linux distro within two hoursRecipes for Sabayon: cook your own Linux distro within two hours
Recipes for Sabayon: cook your own Linux distro within two hoursDanilo Pianini
 
A Framework to Specify and Verify Computational Fields for Pervasive Computin...
A Framework to Specify and Verify Computational Fields for Pervasive Computin...A Framework to Specify and Verify Computational Fields for Pervasive Computin...
A Framework to Specify and Verify Computational Fields for Pervasive Computin...Danilo Pianini
 
Gradient-based Self-organisation Patterns of Anticipative Adaptation
Gradient-based Self-organisation Patterns of Anticipative AdaptationGradient-based Self-organisation Patterns of Anticipative Adaptation
Gradient-based Self-organisation Patterns of Anticipative AdaptationDanilo Pianini
 

Mehr von Danilo Pianini (12)

Time fluid field-based Coordination
Time fluid field-based CoordinationTime fluid field-based Coordination
Time fluid field-based Coordination
 
Versioning and License selection
Versioning and License selectionVersioning and License selection
Versioning and License selection
 
Enforce reproducibility: dependency management and build automation
Enforce reproducibility: dependency management and build automationEnforce reproducibility: dependency management and build automation
Enforce reproducibility: dependency management and build automation
 
Productive parallel teamwork: Decentralized Version Control Systems
Productive parallel teamwork: Decentralized Version Control SystemsProductive parallel teamwork: Decentralized Version Control Systems
Productive parallel teamwork: Decentralized Version Control Systems
 
Continuous integration and delivery
Continuous integration and deliveryContinuous integration and delivery
Continuous integration and delivery
 
Engineering computational ecosystems (2nd year PhD seminar)
Engineering computational ecosystems (2nd year PhD seminar)Engineering computational ecosystems (2nd year PhD seminar)
Engineering computational ecosystems (2nd year PhD seminar)
 
From Engineer to Alchemist, There and Back Again: An Alchemist Tale
From Engineer to Alchemist, There and Back Again: An Alchemist TaleFrom Engineer to Alchemist, There and Back Again: An Alchemist Tale
From Engineer to Alchemist, There and Back Again: An Alchemist Tale
 
SAPERE WP1 Alchemist status at 02/2013
SAPERE WP1 Alchemist status at 02/2013SAPERE WP1 Alchemist status at 02/2013
SAPERE WP1 Alchemist status at 02/2013
 
Engineering Computational Ecosystems
Engineering Computational EcosystemsEngineering Computational Ecosystems
Engineering Computational Ecosystems
 
Recipes for Sabayon: cook your own Linux distro within two hours
Recipes for Sabayon: cook your own Linux distro within two hoursRecipes for Sabayon: cook your own Linux distro within two hours
Recipes for Sabayon: cook your own Linux distro within two hours
 
A Framework to Specify and Verify Computational Fields for Pervasive Computin...
A Framework to Specify and Verify Computational Fields for Pervasive Computin...A Framework to Specify and Verify Computational Fields for Pervasive Computin...
A Framework to Specify and Verify Computational Fields for Pervasive Computin...
 
Gradient-based Self-organisation Patterns of Anticipative Adaptation
Gradient-based Self-organisation Patterns of Anticipative AdaptationGradient-based Self-organisation Patterns of Anticipative Adaptation
Gradient-based Self-organisation Patterns of Anticipative Adaptation
 

Kürzlich hochgeladen

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Kürzlich hochgeladen (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Protelis: Practical Aggregate Programming - Symposium on Applied Computing (SAC), 2015

  • 1. Protelis: Practical Aggregate Programming Danilo Pianini, Mirko Viroli {danilo.pianini,mirko.viroli}@unibo.it Jacob Beal jakebeal@bbn.com Universit`a di Bologna Italy Raytheon BBN Technologies United States of America Symposium on Applied Computing 2015 Salamanca Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 1 / 37
  • 2. Outline You’ll soon have your God, and you’ll make it with your hands. 1 Aggregate Programming Local to Global From Proto to Field Calculus 2 Protelis Language features Simulator and Runtime Examples 3 Conclusion and Future work Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 2 / 37
  • 3. Aggregate Programming Outline 1 Aggregate Programming Local to Global From Proto to Field Calculus 2 Protelis Language features Simulator and Runtime Examples 3 Conclusion and Future work Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 3 / 37
  • 4. Aggregate Programming Local to Global Our stage Large number of devices or services Possibly situated Capable of sensing, computing, communicating Behaviour must be coordinated to achieve a global goal Pervasive Continuum or (pick the one you prefer): Pervasive computing Smart cities Internet of things Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 4 / 37
  • 5. Aggregate Programming Local to Global Classic approach Local to global Complex global behaviour Simple local behaviour The whole is more than the sum of the parts Interaction is key Nature inspiration Several systems use nature as inspiration: physical particles [MZ09] chemical reactions [ZCF+11] ants, termites and other social insects [TM03] Very brief list! There are many more. Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 5 / 37
  • 6. Aggregate Programming Local to Global Nice properties and hard challenges The beauty High resilience and fault tolerance Self adaptation Openness Self healing The beast Local to global is hard to engineer The desired functionality happens at the aggregate level It is very difficult to design the local behaviour in such a way that the interaction of many of them produces the desired global behaviour Many attempts, but no good engineering processes to safely design such systems Often, development becomes a try-and-simulate loop Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 6 / 37
  • 7. Aggregate Programming Local to Global Collective to local Device& Neighborhood& Manifold& Device& Neighborhood& Network& Possible solution Create a language that allows to express collective properties Create a runtime that can run such programs Possibly, also create a tool to test programs prior to deployment Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 7 / 37
  • 8. Aggregate Programming From Proto to Field Calculus Existing languages MIT Proto [BB06] is the most known and successful Developed at MIT and maintained at BBN Technologies Functional language, LISP-like syntax (I know you hate it too) All devices run the same program Computation happens in rounds: Every device sleeps for some time Processes the messages received from the neighbours Executes its program Sends all the neighbours its result Complex operational semantics Difficult to maintain and extend Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 8 / 37
  • 9. Aggregate Programming From Proto to Field Calculus Field Calculus A “distillate” of Proto Provides a lightweight operational semantics [VDB13] ((((LISP-like syntax)))) Still a functional language Simple enough to formally prove properties, powerful enough to be universal (proved!) Theoretical object, no runtime nor simulation tool provided Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 9 / 37
  • 10. Protelis Outline 1 Aggregate Programming Local to Global From Proto to Field Calculus 2 Protelis Language features Simulator and Runtime Examples 3 Conclusion and Future work Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 10 / 37
  • 11. Protelis Language features Ordinary language features Functional language Same operational semantics of the field calculus C-family syntax with infix operators Java interoperability: static methods imports and calls, method invocation with dynamic binding Higher order functions (functions as arguments, lambdas) Dynamic code Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 11 / 37
  • 12. Protelis Language features Field calculus operators rep defines a locally visible variable Retains its value at each computation round Enables stateful computation nbr Builds a field Map device →value Includes self *hood built-in functions summarize the field back to ordinary expressions Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 12 / 37
  • 13. Protelis Language features Branching mux / else Functional inclusive “multiplexing” branching Evaluates both branches, then returns the correct one nbrs in branches can “align” if / else Exclusive branching: nbrs in different branches do not “align” Network gets partitioned into two regions Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 13 / 37
  • 14. Protelis Language features Code example def count() { rep(x<-0) { x + 1 } } def maxh(field) { maxHood(nbr{field}) } def distanceTo(source) { rep (d <- Infinity) { mux (source) { 0 } else { minHood(nbr{d} + nbrRange) } } } def distanceToWithObstacle(source, obstacle) { if (obstacle) { Infinity } else { distanceTo(source) } } Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 14 / 37
  • 15. Protelis Simulator and Runtime Architecture Implementation, distribution Based on Xtext Eclipse plugin Integrated with Alchemist [PMV13] Stand-alone framework for real devices Write once, run everywhere — evolved :) Now distributed through Maven Central a a artifact: it.unibo.alchemist:alchemist.protelis Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 15 / 37
  • 16. Protelis Simulator and Runtime Abstract architecture Protelis)Parser) Protelis)Device) Environment) Variables) Protelis) Interpreter) Protelis)Program) Other& Devices& Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 16 / 37
  • 17. Protelis Simulator and Runtime Simulation runtime architecture Simulated*Device* Protelis*Parser* Protelis*Device* Environment* Variables* Protelis* Interpreter* Protelis)Program) Simulated* Environment* Simula8on* Builder* Simula/on)Script) Alchemist* Simulator* Simulated* Network* Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 17 / 37
  • 18. Protelis Simulator and Runtime Standalone runtime architecture Daemon'Device' Protelis'Parser' Protelis'Device' Environment' Variables' Protelis' Interpreter' Protelis)Program) Service' Manager' Daemon' Networked' Service' Start/Stop' Signals' Status,' Sockets' Other& Services& Other& Managers& Enterprise& Server& Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 18 / 37
  • 19. Protelis Examples Rendezvous at a Mass Event Problem Large public event People want to rendezvous with a companion Cloud-based services may be unreachable Possible solution with Protelis Simple P2P geometric calculation across network Testbed Simulated in Alchemist Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 19 / 37
  • 20. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 20 / 37
  • 21. Protelis Examples Rendezvous at a Mass Event // Follow the gradient of a potential field down from a source def descend(source, potential) { rep(path <- source) { let nextStep = minHood(nbr([potential, self.getId()])); if (nextStep.size() > 1) { let candidates = nbr([nextStep.get(1), path]); source || anyHood([self.getId(), true] == candidates) } else { source } } } def rendezvous(person1, person2) { descend (person1 == owner, distanceTo(person2 == owner)) } // Example of using rendezvous rendezvous("Alice", "Bob"); Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 21 / 37
  • 22. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 22 / 37
  • 23. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 23 / 37
  • 24. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 24 / 37
  • 25. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 25 / 37
  • 26. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 26 / 37
  • 27. Protelis Examples Rendezvous at a Mass Event Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 27 / 37
  • 28. Protelis Examples Network Service Management Problem Legacy or poorly coded services do not respond gracefully to the failure of their dependencies Risk of inconsistent state and of being unable to resume correctly when the failed dependency is back online Possible solution with Protelis Attach a Protelis daemon to each service, which watches its status and communicates with other daemons to coordinate shutdown and restart Testbed Implemented on a network of EmuLab servers Services are emulated by query-response networking Java programs they “hang” when triggered or when their queries consistently fail Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 28 / 37
  • 29. Protelis Examples Network Service Management External) Portals) Supplies) Database) Financial) Database) Logis7cs) Server) Backup) Server) B2B)Catalog) Server) Interac(on* Dependency* Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 29 / 37
  • 30. Protelis Examples Network Service Management import it.unibo.alchemist.language.protelis.datatype.Tuple.* import com.bbn.a3.distributedrestart.DaemonNode.* // Compare required and available services let nbr_set = unionHood(nbr([serviceID])); let nbr_missing = dependencies.subtract(nbr_set); let nbr_required = #contains(dependencies, nbr(serviceID)); let nbr_down = nbr(managedServiceStatus=="hung" || managedServiceStatus=="stop"); // Is service currently safe to run? let problem = anyHood(nbr_down && nbr_required) || !nbr_missing.isEmpty(); // Take managed service up and down accordingly if (managedServiceStatus == "run" && problem) { #stopProcess(managedService); } else { if (managedServiceStatus=="stop" && !problem) { #startProcess(managedService); } else { managedServiceStatus } } Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 30 / 37
  • 31. Protelis Examples Network Service Management Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 31 / 37
  • 32. Conclusion and Future work Outline 1 Aggregate Programming Local to Global From Proto to Field Calculus 2 Protelis Language features Simulator and Runtime Examples 3 Conclusion and Future work Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 32 / 37
  • 33. Conclusion and Future work Conclusion and Future Work Conclusion Universality and coherence by building atop the field calculus Accessibility, portability and ease of integration by Java interoperability Important component of the toolchain necessary for using aggregate programming in practice Future work Development is very active Next step: use Protelis to build a library of reusable, high-level building blocks for distributed applications. Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 33 / 37
  • 34. References References I Jacob Beal and Jonathan Bachrach. Infrastructure for engineered emergence on sensor/actuator networks. IEEE Intelligent Systems, 21(2):10–19, 2006. Marco Mamei and Franco Zambonelli. Programming pervasive and mobile computing applications: The tota approach. ACM Trans. Softw. Eng. Methodol., 18(4):1–56, 2009. Danilo Pianini, Sara Montagna, and Mirko Viroli. Chemical-oriented simulation of computational systems with Alchemist. Journal of Simulation, 2013. Robert Tolksdorf and Ronaldo Menezes. Using swarm intelligence in linda systems. In Andrea Omicini, Paolo Petta, and Jeremy Pitt, editors, ESAW, volume 3071 of Lecture Notes in Computer Science, pages 49–65. Springer, 2003. Mirko Viroli, Ferruccio Damiani, and Jacob Beal. A calculus of computational fields. In Carlos Canal and Massimo Villari, editors, Advances in Service-Oriented and Cloud Computing, volume 393 of Communications in Computer and Information Science, pages 114–128. Springer Berlin Heidelberg, 2013. Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 34 / 37
  • 35. References References II Franco Zambonelli, Gabriella Castelli, Laura Ferrari, Marco Mamei, Alberto Rosi, Giovanna Di Marzo, Matteo Risoldi, Akla-Esso Tchao, Simon Dobson, Graeme Stevenson, Yuan Ye, Elena Nardini, Andrea Omicini, Sara Montagna, Mirko Viroli, Alois Ferscha, Sascha Maschek, and Bernhard Wally. Self-aware pervasive service ecosystems. Procedia Computer Science, 7:197–199, December 2011. Proceedings of the 2nd European Future Technologies Conference and Exhibition 2011 (FET 11). Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 35 / 37
  • 36. References Protelis: Practical Aggregate Programming Danilo Pianini, Mirko Viroli {danilo.pianini,mirko.viroli}@unibo.it Jacob Beal jakebeal@bbn.com Universit`a di Bologna Italy Raytheon BBN Technologies United States of America Symposium on Applied Computing 2015 Salamanca Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 36 / 37
  • 37. References Simpler semantics Proto Field calculus Pianini, Viroli, Beal (UniBo / BBN) Protelis — Aggregate programming 2015-04-16 SAC/CM 37 / 37