+ All Categories
Home > Documents > Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc...

Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc...

Date post: 22-Jan-2020
Category:
Upload: others
View: 13 times
Download: 0 times
Share this document with a friend
141
Ambient References: Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels, Belgium Private PhD Defense, April 30th 2008, Brussels Promotors: Prof. Dr. Wolfgang De Meuter Prof. Dr. Theo D’Hondt
Transcript
Page 1: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Ambient References:Object Designation in Mobile Ad Hoc Networks

Tom Van Cutsem

Programming Technology LabVrije Universiteit Brussel

Brussels, Belgium

Private PhD Defense, April 30th 2008, Brussels

Promotors:Prof. Dr. Wolfgang De MeuterProf. Dr. Theo D’Hondt

Page 2: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Page 3: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Page 4: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Page 5: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Coordination

?

Page 6: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Criteria

Coordination

?

Page 7: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Characteristics

Criteria

Coordination

?

Page 8: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Issues

Characteristics

Criteria

Coordination

?

Page 9: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Issues

Characteristics

Criteria

Coordination

?

Page 10: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Issues

Characteristics

Criteria

Ambient References

Coordination

?

Page 11: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Page 12: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Page 13: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Implementation

Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Page 14: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap3

Motivation

Mobile ad hoc networks

Contribution Validation

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Page 15: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap3

Motivation

Mobile ad hoc networks

Contribution Validation

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Context & Problem Statement

Page 16: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Ubiquitous Computing

Page 17: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Page 18: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Zero Infrastructure

Page 19: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Volatile Connections

Zero Infrastructure

Page 20: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Problem Statement

• Ambient-oriented Programming [Dedecker06]: traditional OOP does not scale in MANETs. How can we:

• designate objects, with zero infrastructure?

• communicate with objects, across volatile connections?

• Answer: event-based communication

• But: such communication is fundamentally not object-oriented

5

Page 21: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Problem Statement

• Ambient-oriented Programming [Dedecker06]: traditional OOP does not scale in MANETs. How can we:

• designate objects, with zero infrastructure?

• communicate with objects, across volatile connections?

• Answer: event-based communication

• But: such communication is fundamentally not object-oriented

5

object-event impedance mismatch

Page 22: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap6

Motivation Contribution Validation

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Evaluation

Ambient References

Coordination

Page 23: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap6

Motivation Contribution Validation

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Evaluation

Ambient References

Coordination

Coordination in Mobile ad hoc Networks

Characteristics

Criteria

Issues

Page 24: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks7

uMaMa

Page 25: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery

Page 26: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery Communication

Page 27: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery Communication Synchronisation

21%

32%

Page 28: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks8

uMaMa

Discovery Communication Synchronisation

Page 29: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Coordination in Mobile Ad Hoc Networks8

uMaMa

Failure handlingDiscovery Communication Synchronisation

Page 30: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria for Coordination in MANETs9

Volatile Connections

Zero Infrastructure

Page 31: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria for Coordination in MANETs9

Decentralised Discovery

Volatile Connections

Zero Infrastructure

Page 32: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria for Coordination in MANETs9

Decentralised Discovery

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

Page 33: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria for Coordination in MANETs9

Decentralised DiscoveryTime & synchronisation

decoupled communication

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

Page 34: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria for Coordination in MANETs9

Connection-independent Failure handling

Decentralised DiscoveryTime & synchronisation

decoupled communication

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

Page 35: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

Page 36: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

Page 37: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

Page 38: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

OO Message Passing metaphor => bad decoupling

Page 39: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

OO Message Passing metaphor => bad decoupling

Page 40: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

OO Message Passing metaphor => bad decoupling

Page 41: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Survey of Related Work10

CH

APTER

3.C

OO

RD

INATIO

NIN

MO

BILE

AD

HO

CN

ETWO

RK

S45

Decoupling in Failure Decentr. MessageTime Space Synchronisation Arity Handling Discovery Passing

Languages for Local Area NetworksEmerald N (Error) N (Address) N (RPC) N Exc. N YObliq N (Error) N (Address) N (RPC) N Exc. N YABCL Y (Buffer) N (Address) Sender only N N N YLanguages for Wide Area NetworksErlang Y (Buffer) N (Address) Sender only N React N YArgus N (Error) N (Address) N(RPC) N Exc. N YJanus Y (Blocks) N (Address) N (Logic Var) N N N NSalsa Y (Buffer) N (Address) Y (Async Msg) N N N YE N (Error) N (Address) Y (Async Msg) N React N YDistributed Oz Y (Blocks) N (Address) N (Logic Var) N React N YLanguages for Wireless Sensor NetworksActorNet Y (Buffer) N (Address) Y (Async Msg) Y N N YSpatialViews Y (Mediator) Y (Discovery) Y (Mediator) Y N N NModels and Calculi for Wide Area NetworksActors Y (Buffer) N (URI) Y (Async Msg) N N N YActorSpace Y (Buffer) Y (Mediator) Y (Async Msg) Y N N YMobile Ambients Y (Mediator) Y (Mediator) Sender only N N N NTuple Space Middleware for Ad Hoc NetworksLIME Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NTOTA Y (Mediator) Y (Mediator) Y (Mediator) Y React Y NMARS Y (Mediator) Y (Mediator) Y (Mediator) Y Lease N NMiddleware for Nomadic NetworksRover Y (Buffer) N (Address) Y (Async Msg) N React N YJINI N (Error) Y (Discovery) N (RPC) N Lease Y YPublish-Subscribe Middleware for Ad Hoc NetworksEMMA N (Lost) Y (Mediator) Y (Mediator) Y Lease Y NLPS Y (Mediator) Y (Mediator) Y (Mediator) Y N N NSTEAM N (Lost) Y (Mediator) Y (Mediator) Y N N NM2MI N (Lost) Y (Broadcast) Y (Async Msg) Y N N Yone.world N (Lost) Y (Discovery) Y (Mediator) Y Lease Y N

Table 3.2: Survey of Related Work.

OO Message Passing metaphor => bad decoupling

Pub/sub & Tuple spaces => better decoupling

Page 42: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

epublisher

Page 43: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

e

receiver.m()publish(e)

specific interface

def m() { ...}

subscribe(e, callback)generic interface

publisher

Page 44: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

eprivate designationglobal

designation

publisher

Page 45: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

e

bidirectional

unidirectional

publisher

Page 46: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

epublisher

threads

event loops

Page 47: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap12

Motivation Contribution Validation

Mobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Page 48: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap12

Motivation Contribution Validation

Mobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Coordination in Mobile ad hoc Networks

Page 49: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Language Features13

AmbientTalk

E

event loop concurrency

Smalltalk

block closures

keyworded messagestraits Self

prototypes

delegationmirrors

[Miller et al. 97]

[Ungar&Smith 87][Goldberg&Robson 83]

Scheme Agora

Pico CLOS

Page 50: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

Actor

Message queue Event loop

Page 51: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

‘local’ object

Page 52: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

‘local’ object

obj

obj.m()

Page 53: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

‘remote’ object

Page 54: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

‘remote’ object

obj<-m()

Page 55: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

‘remote’ object

?

future

Page 56: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

?

future

when: future becomes: { |value| // process reply}

Page 57: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

?

future

value

when: future becomes: { |value| // process reply}

Page 58: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Event Loop Concurrency in AmbientTalk14

Actors cannot deadlock

No race conditions on objects

?

future

value

when: future becomes: { |value| // process reply}

Page 59: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Exporting & discovering objects15

mplayer

Page 60: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Exporting & discovering objects15

mplayer

deftype MusicPlayer deftype MusicPlayer

Page 61: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

deftype MusicPlayer deftype MusicPlayer

Page 62: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

whenever: MusicPlayer discovered: { |mplayer| // open a session}

deftype MusicPlayer deftype MusicPlayer

Page 63: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

whenever: MusicPlayer discovered: { |mplayer| // open a session}

deftype MusicPlayer deftype MusicPlayer

Page 64: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

downloadSong

Page 65: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

downloadSong

Page 66: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

downloadSong

Page 67: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

Page 68: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

Page 69: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

Page 70: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Far References16

session

when: session<-downloadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

Page 71: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap17

Motivation Contribution Validation

Ambient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Coordination

Page 72: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap17

Motivation Contribution Validation

Ambient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Coordination

Ambient References

Page 73: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Page 74: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Page 75: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Page 76: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Page 77: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Page 78: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Page 79: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Fundamental problem: far references feature neither space nor arity decoupling

Page 80: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

Ambient reference a =〈 f, M 〉

Page 81: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

O

Universe O

Ambient reference a =〈 f, M 〉

Page 82: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

s4

s1

s2

s6

s5

s3

O

Universe O

Ambient reference a =〈 f, M 〉

Page 83: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

fa(s) = s ≡

s4

s1

s2

s6

s5

s3

O

Universe O

Ambient reference a =〈 f, M 〉

Page 84: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

fa(s) = s ≡

s4

s1

s2

s6

s5

s3

Scope Sa = { s ∈ O | fa(s) }

Sa

O

Universe O

Ambient reference a =〈 f, M 〉

Page 85: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

fa(s) = s ≡

s4

s1

s2

s6

s5

s3

Scope Sa = { s ∈ O | fa(s) }

Sa

Range Aa(t) = all objects in communication range at time t

Aa(t)

O

Universe O

Ambient reference a =〈 f, M 〉

Page 86: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Abstractly spoken19

a

fa(s) = s ≡

s4

s1

s2

s6

s5

s3

Reach Ra(t) = Sa ∩ Aa(t)

Ra(t)

Scope Sa = { s ∈ O | fa(s) }

Sa

Range Aa(t) = all objects in communication range at time t

Aa(t)

O

Universe O

Ambient reference a =〈 f, M 〉

Page 87: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

Page 88: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

Scope

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

Page 89: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

Scope

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

deftype Player;

Type tags

Page 90: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

Scope

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

def Player := protocol: { def askToVote(question); ...}

Protocols

deftype Player;

Type tags

Page 91: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

Eventual reference

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

Page 92: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concretely spoken20

Delivery policies

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];

Page 93: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Example: Location Tracker21

def ap := ambient: LocationService;def updateLocation(newLoc) {

}

a

s1

ap<-submitLocation(id,newLoc)@[One,Instant,Oneway];

Page 94: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Example: Location Tracker21

def ap := ambient: LocationService;def updateLocation(newLoc) {

}

a

s1

ap<-submitLocation(id,newLoc)@[One,Instant,Oneway];

Page 95: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Example: Location Tracker21

def ap := ambient: LocationService;def updateLocation(newLoc) {

}

a

s1

submitLocation

ap<-submitLocation(id,newLoc)@[One,Sustain,Oneway];

Page 96: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Example: Location Tracker21

def ap := ambient: LocationService;def updateLocation(newLoc) {

}

a

s1

submitLocation

ap<-submitLocation(id,newLoc)@[One,Sustain,Oneway];

Page 97: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Example: Location Tracker21

def ap := ambient: LocationService;def updateLocation(newLoc) {

}

a

s1

ap<-submitLocation(id,newLoc)@[One,Sustain,Oneway];

Page 98: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

Page 99: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

askToVote

Page 100: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

Page 101: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

Page 102: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

askToVote

Page 103: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

Page 104: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

Page 105: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

askToVote

Page 106: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

askToVote?

Page 107: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

Page 108: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

def players := ambient: Player where: { |p| p.team == “blue” }def handle := players<-askToVote(q)@[All,Expires(minutes(1))];whenAll: handle.future resolved: { |votes| // process the votes} ruined: { |exceptions| // ignore faulty players}

Example: Voting22

a

p2

p3

p1

Page 109: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Delivery Policies23

Discovery Lifetime

CommunicationLifetime

AritySustainableInstant Transient

One-way

Unbounded Bounded Expirable

@Due(t) @Expires(t)

@Sustain@Instant @Transient(t)

@Reply

@Oneway

Point-to-point@One

One-to-many

@AllTwo-way

Page 110: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap24

Motivation Contribution Validation

Evaluation

Ambient References

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Coordination

Page 111: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap24

Motivation Contribution Validation

Evaluation

Ambient References

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Coordination

Evaluation

Language

Criteria

Issues

LanguageFeature

Page 112: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Page 113: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Page 114: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

Page 115: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

Synchronisation-decoupled communication

<-when:becomes:

<-whenAll:resolved:

Page 116: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

Synchronisation-decoupled communication

<-when:becomes:

<-whenAll:resolved:

Space-decoupled communication

ambient: description

Page 117: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

Synchronisation-decoupled communication

<-when:becomes:

<-whenAll:resolved:

Space-decoupled communication

ambient: description

@AllArity-decoupled communication

Page 118: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

Synchronisation-decoupled communication

<-when:becomes:

<-whenAll:resolved:

Space-decoupled communication

ambient: description

@AllArity-decoupled communication

Connection-independent Failure handling

@Due, Leasing @Expires

Page 119: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

Page 120: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

Page 121: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

receivers<-m()specific interface

def m() { ...}

Page 122: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

global designation

Page 123: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

bidirectional

handle

Page 124: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

event loops

Page 125: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap27

Motivation Contribution Validation

ImplementationAmbient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Evaluation

Coordination

Page 126: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Roadmap27

Motivation Contribution Validation

ImplementationAmbient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Evaluation

Coordination

Implementation & Validation

Page 127: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

reach

Page 128: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient referenceDiscovery

Lifetime

CommunicationLifetime

AritySustainableInstant Transient

One-way

Unbounded Bounded Expirable

@Due(t) @Expires(t)

@Sustain@Instant @Transient(t)

@Reply

@Oneway

Point-to-point@One

One-to-many

@AllTwo-way

@Annotations

message handler

!tc

n

!td

Modular implementation via traits

reach

Page 129: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

message handler

!tc

n

!td

Modular implementation via traits

reach

mirror

intercept

Page 130: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Page 131: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Page 132: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Page 133: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reachExtensional reach: collection of far references

mirror

Page 134: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Intensional reach: M2MI omnihandles

Linguistic Symbiosis

JVMAmbientTalk

Interpreter

M2MI

Page 135: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Page 136: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Page 137: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Location Tracker

Voting

Page 138: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

- Thread Synchronisation- Explicit callbacks- Explicit scheduling code- No dynamic attributes

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Location Tracker

Voting

Page 139: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Concluding Remarks

30

Page 140: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Future Work31

Security: controlling visibility of exported objects & ambient references

Service Discovery: ontologies, describing services, ...

More efficient implementation strategies

Page 141: Ambient References: Object Designation in Mobile Ad Hoc ... · Object Designation in Mobile Ad Hoc Networks Tom Van Cutsem Programming Technology Lab Vrije Universiteit Brussel Brussels,

Conclusion

• Ambient-oriented Programming = “OOP in MANETs”

• Object communication: decoupled in time & synchronisation [Dedecker 06]

• Object designation: decoupled in space & arity

• Ambient references: intensional remote object references

• Unification of OO and event-based publish/subscribe interaction

32


Recommended