Aggregate Programming Part 3: Applica2on Examples Jacob - - PowerPoint PPT Presentation

aggregate programming part 3 applica2on examples
SMART_READER_LITE
LIVE PREVIEW

Aggregate Programming Part 3: Applica2on Examples Jacob - - PowerPoint PPT Presentation

Aggregate Programming Part 3: Applica2on Examples Jacob Beal SFM16: QUANTICOL June 2016 Aggregate Programming Stack Crowd&Management& Applica'on* dangerousDensity crowdTracking


slide-1
SLIDE 1

Aggregate ¡Programming ¡ Part ¡3: ¡Applica2on ¡Examples ¡

Jacob ¡Beal ¡

SFM16: ¡QUANTICOL ¡ June ¡2016 ¡

slide-2
SLIDE 2

sensors& local&func,ons& actuators&

Applica'on* Code* Developer* APIs* Field*Calculus* Constructs* Resilient* Coordina'on* Operators* Device* Capabili'es* built&ins)

rep nbr if T G if C

built&ins)

communica,on& state& restric,on&

Percep,on&

summarize average regionMax …

Ac,on& State& Collec,ve&Behavior&

distanceTo broadcast partition … timer lowpass recentTrue … collectivePerception collectiveSummary managementRegions …

Crowd&Management&

dangerousDensity crowdTracking crowdWarning safeDispersal

Aggregate Programming Stack

slide-3
SLIDE 3

Crowd Safety Services

def ¡dangerousDensity(p, ¡r) ¡{ ¡ ¡ ¡let ¡mr ¡= ¡managementRegions(r*2, ¡() ¡-­‑> ¡{ ¡nbrRange ¡}); ¡ ¡ ¡let ¡danger ¡= ¡average(mr, ¡densityEst(p, ¡r)) ¡> ¡2.17 ¡&& ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡summarize(mr, ¡sum, ¡1 ¡/ ¡p, ¡0) ¡> ¡300; ¡ ¡ ¡if(danger) ¡{ ¡high ¡} ¡else ¡{ ¡low ¡} ¡ } ¡ def ¡crowdTracking(p, ¡r, ¡t) ¡{ ¡ ¡ ¡let ¡crowdRgn ¡= ¡recentTrue(densityEst(p, ¡r)>1.08, ¡t); ¡ ¡ ¡ ¡if(crowdRgn) ¡{ ¡dangerousDensity(p, ¡r) ¡} ¡else ¡{ ¡none ¡}; ¡ } ¡ def ¡crowdWarning(p, ¡r, ¡warn, ¡t) ¡{ ¡ ¡ ¡distanceTo(crowdTracking(p,r,t) ¡== ¡high) ¡< ¡warn ¡ } ¡

Dissemina`on ¡of ¡new ¡versions ¡ Pre-­‑emp`ve ¡modula`on ¡of ¡priori`es ¡

slide-4
SLIDE 4

Dependency-Directed Recovery

2 4 6 8 10 12 14 16 18 20 22 10 20 30 40 50 60 70

# of services Restart time (seconds)

Fixed−Order Erdos−Renyi Layered Clustered

Drama2cally ¡be9er ¡recovery ¡2me ¡

2 4 6 8 10 12 14 16 18 20 22 10 20 30 40 50 60 70 80 90 100

# of services Percent of query originators affected

Erdos−Renyi Layered Clustered

Fewer ¡services ¡disrupted ¡

App#1#

Portal' Exchange' Core'Logic' Database' App'Server' Legacy'Unix'

App#2# Gateway#B# Gateway#A# Core#1# Core#2# Core#3#

Iden2fy ¡& ¡shut ¡down ¡ affected ¡services ¡ Non-­‑dependent ¡ services ¡s2ll ¡run ¡ [Clark, ¡Beal, ¡& ¡Pal, ¡SASO ¡‘15] ¡

slide-5
SLIDE 5

DDR Algorithm

  • Is it safe for the service to run? i.e. are its

dependencies satisfied?

  • If the service is running and not safe

– Stop service

  • If the service is not running and safe

– Start service

5 ¡

slide-6
SLIDE 6

Opportunistic Airborne Sensor Sharing

[Beal, ¡Usbeck, ¡Loyall ¡& ¡Metzler, ¡in ¡prep] ¡

1 2 3 4 5 6 7 8 20 40 60 Number of sets Seconds Variable UAVs Variable Targets Air Cell Dams Fire Heli Hosp Mil Pow 0.8 0.85 0.9 0.95 1 UAV set excluded Fraction Covered

Highly ¡effec2ve ¡sharing ¡ Low ¡computa2onal ¡cost ¡ GIS-­‑integrated ¡adap2ve ¡mission ¡planning ¡

slide-7
SLIDE 7

Distributed Rewind and Replay

slide-8
SLIDE 8

Tactical Cloud Services

slide-9
SLIDE 9

Swarm Command & Control

  • Build on top of continuous

space model with:

– Modulation by autonomic management layers – Basis set of “maneuvers”

!"#$""%& '%()*+%,

  • $")./+&

012/"/#)* 3$.%24 012/"/#)*

  • $)"2%"$"*%

5$*2)*$+

  • $"%16%7

81#$"9:7;$")<$2)/"

0th ¡moment ¡ 1st ¡moment ¡ 2nd ¡moment ¡

… ¡

Separate ¡ Connect ¡

[Beal, ¡2012] ¡

slide-10
SLIDE 10

Agent-Based Simulations

[Beal ¡et ¡al., ¡2012] ¡

slide-11
SLIDE 11

Engineering Biological Systems

If detect explosives: emit signal If signal > threshold: glow red

Mammalian ¡Target ¡

  • E. ¡coli ¡Target ¡

Uninduced ¡ Uninduced ¡ Induced ¡ Induced ¡ [Beal ¡et ¡al., ¡2012] ¡

(def simple-sensor-actuator () (let ((x (test-sensor))) (debug-1 x) (debug-2 (not x))))

slide-12
SLIDE 12

sensors& local&func,ons& actuators&

Applica'on* Code* Developer* APIs* Field*Calculus* Constructs* Resilient* Coordina'on* Operators* Device* Capabili'es* built&ins)

rep nbr if T G if C

built&ins)

communica,on& state& restric,on&

Percep,on&

summarize average regionMax …

Ac,on& State& Collec,ve&Behavior&

distanceTo broadcast partition … timer lowpass recentTrue … collectivePerception collectiveSummary managementRegions …

Crowd&Management&

dangerousDensity crowdTracking crowdWarning safeDispersal

Summary: Aggregate Methodology

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&

restrict

Minimal'Resilient' Implementa.on' Op.mized' Implementa.on' Self5Org.'System' Specifica.on' Substitution Library "Building Block" Library

Decompose(into( Building(Blocks( Op3mize(by( subs3tu3on( Subs3tu3on( rela3ons(

slide-13
SLIDE 13

Summary

  • Major technological trends are all driving towards

a world filled with distributed systems

  • Aggregate programming aims at rapid and

reliable engineering of complex distributed systems

  • Field calculus provides a universal theoretical

foundation for aggregate programming

  • Resilient systems design can be simplified by an

emerging self-organization toolbox

  • Functional composition allows modulation,

predictable convergence

slide-14
SLIDE 14

Lots of open problems…

  • Many field calculus results may be more

generally applicable to all distributed systems

  • Extent of basis set needed for various domains
  • What implicit propeties are needed/possible for

building block algebras and libraries?

  • Extension to mobile devices, ongoing changes
  • Prediction of approximation quality – “Nyquist”
  • Open environments and security

But we’ve already enough for many applications...

slide-15
SLIDE 15

Bibliography

  • Beal J, Dulman S, Usbeck K, Viroli M, Correll N. Organizing the Aggregate: Languages for Spatial
  • Computing. In: Mernik M, editor. Formal and Practical Aspects of Domain-Specific Languages:

Recent Developments. IGI Global; 2013. p. 436–501.

  • Viroli M, Damiani F, Beal J. A Calculus of Computational Fields. In: Canal C, Villari M, editors.

Advances in Service-Oriented and Cloud Computing. vol. 393 of Communications in Computer and Information Sci. Springer Berlin Heidelberg; 2013. p. 114–128.

  • Beal J, Bachrach J. Infrastructure for Engineered Emergence in Sensor/Actuator Networks. IEEE

Intelligent Systems. 2006 March/April;21:10–19.

  • Beal J, Viroli M, Damiani F. Towards a Unified Model of Spatial Computing. In: 7th Spatial

Computing Workshop (SCW 2014). AAMAS 2014, Paris, France; 2014.

  • Fernandez-Marquez J, Marzo Serugendo G, Montagna S, Viroli M, Arcos J. Description and

composition of bio-inspired design patterns: a complete overview. Natural Computing. 2013;12(1): 43–67.

  • Viroli M, Damiani F. A Calculus of Self-stabilising Computational Fields. In: 16th Conference on

Coordination Languages and Models (Coordination 2014); 2014. p. 163–178.

  • Beal J, Viroli M. Building blocks for aggregate programming of self-organising applications. In:

Workshop on Foundations of Complex Adaptive Systems (FOCAS); 2014.

  • Beal J. A Basis Set of Operators for Space-Time Computations. In: Spatial Computing Workshop;

2010.

  • Jacob Beal, Mirko Viroli, Danilo Pianini, and Ferruccio Damiani. Scale-independent computations

in situated networks. under review.

slide-16
SLIDE 16

Acknowledgements

  • Shane Clark
  • Partha Pal
  • Kyle Usbeck
  • Mirko Viroli
  • Danilo Pianini
  • Soura Dasgupta
  • Raghu Mudumbai
  • Amy Kumar
  • Ferruccio Damiani