ambient references: object designation in mobile ad hoc ... · object designation in mobile ad hoc...

Post on 22-Jan-2020

17 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Roadmap2

Roadmap2

Motivation

Mobile ad hoc networks

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Characteristics

Criteria

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Characteristics

Criteria

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Issues

Characteristics

Criteria

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Issues

Characteristics

Criteria

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Issues

Characteristics

Criteria

Ambient References

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Roadmap2

Motivation

Mobile ad hoc networks

Object-event impedance mismatch

Contribution

Implementation

Validation

Evaluation

Issues

Characteristics

Criteria

Language

LanguageFeature

Ambient References

Coordination

?

Roadmap3

Motivation

Mobile ad hoc networks

Contribution Validation

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Roadmap3

Motivation

Mobile ad hoc networks

Contribution Validation

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Context & Problem Statement

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Ubiquitous Computing

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Zero Infrastructure

Mobile Ad Hoc Networks

Networks composed of mobile devices which communicate wirelessly

4

Volatile Connections

Zero Infrastructure

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

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

Roadmap6

Motivation Contribution Validation

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Evaluation

Ambient References

Coordination

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

Coordination in Mobile Ad Hoc Networks7

uMaMa

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery Communication

Coordination in Mobile Ad Hoc Networks7

uMaMa

Discovery Communication Synchronisation

21%

32%

Coordination in Mobile Ad Hoc Networks8

uMaMa

Discovery Communication Synchronisation

Coordination in Mobile Ad Hoc Networks8

uMaMa

Failure handlingDiscovery Communication Synchronisation

Criteria for Coordination in MANETs9

Volatile Connections

Zero Infrastructure

Criteria for Coordination in MANETs9

Decentralised Discovery

Volatile Connections

Zero Infrastructure

Criteria for Coordination in MANETs9

Decentralised Discovery

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

Criteria for Coordination in MANETs9

Decentralised DiscoveryTime & synchronisation

decoupled communication

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

Criteria for Coordination in MANETs9

Connection-independent Failure handling

Decentralised DiscoveryTime & synchronisation

decoupled communication

Space & arity decoupled communication

Volatile Connections

Zero Infrastructure

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.

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.

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.

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

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

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

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

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

epublisher

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

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

eprivate designationglobal

designation

publisher

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

e

bidirectional

unidirectional

publisher

Object-event Impedance Mismatch11

Event broker

receiver

subscribers

me

sender

e

e

epublisher

threads

event loops

Roadmap12

Motivation Contribution Validation

Mobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Roadmap12

Motivation Contribution Validation

Mobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Ambient References

Coordination

Coordination in Mobile ad hoc Networks

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

Event Loop Concurrency in AmbientTalk14

Actor

Message queue Event loop

Event Loop Concurrency in AmbientTalk14

‘local’ object

Event Loop Concurrency in AmbientTalk14

‘local’ object

obj

obj.m()

Event Loop Concurrency in AmbientTalk14

‘remote’ object

Event Loop Concurrency in AmbientTalk14

‘remote’ object

obj<-m()

Event Loop Concurrency in AmbientTalk14

‘remote’ object

?

future

Event Loop Concurrency in AmbientTalk14

?

future

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

Event Loop Concurrency in AmbientTalk14

?

future

value

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

Event Loop Concurrency in AmbientTalk14

Actors cannot deadlock

No race conditions on objects

?

future

value

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

Exporting & discovering objects15

mplayer

Exporting & discovering objects15

mplayer

deftype MusicPlayer deftype MusicPlayer

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

deftype MusicPlayer deftype MusicPlayer

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

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

deftype MusicPlayer deftype MusicPlayer

Exporting & discovering objects15

mplayer

export: mplayer as: MusicPlayer

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

deftype MusicPlayer deftype MusicPlayer

Far References16

session

downloadSong

Far References16

session

downloadSong

Far References16

session

downloadSong

Far References16

session

Far References16

session

Far References16

session

Far References16

session

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

Roadmap17

Motivation Contribution Validation

Ambient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Coordination

Roadmap17

Motivation Contribution Validation

Ambient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Implementation

Evaluation

Coordination

Ambient References

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Motivation18

Second-class communication patterns

Roaming

Provisional Services

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Motivation18

Second-class communication patterns

Roaming One-to-many communication

Provisional Services

Fundamental problem: far references feature neither space nor arity decoupling

Abstractly spoken19

a

Ambient reference a =〈 f, M 〉

Abstractly spoken19

a

O

Universe O

Ambient reference a =〈 f, M 〉

Abstractly spoken19

a

s4

s1

s2

s6

s5

s3

O

Universe O

Ambient reference a =〈 f, M 〉

Abstractly spoken19

a

fa(s) = s ≡

s4

s1

s2

s6

s5

s3

O

Universe O

Ambient reference a =〈 f, M 〉

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 〉

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 〉

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 〉

Concretely spoken20

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

Concretely spoken20

Scope

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

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

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

Concretely spoken20

Eventual reference

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

Concretely spoken20

Delivery policies

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

Example: Location Tracker21

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

}

a

s1

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

Example: Location Tracker21

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

}

a

s1

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

Example: Location Tracker21

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

}

a

s1

submitLocation

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

Example: Location Tracker21

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

}

a

s1

submitLocation

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

Example: Location Tracker21

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

}

a

s1

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

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

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

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?

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?

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

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?

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?

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

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?

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

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

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

Roadmap24

Motivation Contribution Validation

Evaluation

Ambient References

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Coordination

Roadmap24

Motivation Contribution Validation

Evaluation

Ambient References

Object-event impedance mismatch

Mobile ad hoc networksImplementation

Coordination

Evaluation

Language

Criteria

Issues

LanguageFeature

Criteria Revisited25

AmbientTalk Ambient References

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Criteria Revisited25

AmbientTalk Ambient References

Decentralised Discovery whenever:discovered: Can encode discovery

Time-decoupled communication

far references + futures

@Transient, @Sustain

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:

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

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

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

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

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() { ...}

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

global designation

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

bidirectional

handle

O/E Impedance Mismatch Revisited26

Event broker

receiver

subscribers

m e

sender

e

epublisher

m

m

m

Ambientreference

receivers

sender

m

event loops

Roadmap27

Motivation Contribution Validation

ImplementationAmbient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Evaluation

Coordination

Roadmap27

Motivation Contribution Validation

ImplementationAmbient ReferencesMobile ad hoc networks

Object-event impedance mismatch

Evaluation

Coordination

Implementation & Validation

Implementation28

sender ambient reference

reach

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

Implementation28

sender ambient reference

message handler

!tc

n

!td

Modular implementation via traits

reach

mirror

intercept

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reachExtensional reach: collection of far references

mirror

Implementation28

sender ambient reference

dispatch

message handler

!tc

n

!td

reach

mirror

Intensional reach: M2MI omnihandles

Linguistic Symbiosis

JVMAmbientTalk

Interpreter

M2MI

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Location Tracker

Voting

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

Validation29

M2MI [Kaminsky & Bischof 02]Ambient References

Collaborative Chat

Collaborative Slideshow

Location Tracker

Voting

Concluding Remarks

30

Future Work31

Security: controlling visibility of exported objects & ambient references

Service Discovery: ontologies, describing services, ...

More efficient implementation strategies

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

top related