master defense

99
An Open Proximity Model for Service Discovery in Pervasive Computing Victor Ramiro Cid Profesor Guía: Éric Tanter Miembros de la Comisión: Johan Fabry Patricio Inostroza Luciano Ahumada 1

Upload: victor-ramiro

Post on 18-Jul-2015

491 views

Category:

Technology


0 download

TRANSCRIPT

An Open Proximity Model for Service Discovery in Pervasive Computing

Victor Ramiro Cid

Profesor Guía: Éric Tanter

Miembros de la Comisión: Johan Fabry

Patricio InostrozaLuciano Ahumada

1

Contents

1. Motivation and Context

2. Open Proximity Model

3. Open Proximity Model in AmbientTalk

4. Conclusions and Perspectives

2

2

Motivation and Context

3

3

Pervasive Computing

4

4

Pervasive Computing

5

5

Service Discovery

6

6

Service Discovery

Advertising

6

6

Service Discovery

Advertising

Querying

6

6

Service Discovery

Advertising

Querying

6

6

Service Discovery

Advertising

Querying

6

6

Service Discovery - Client

7

7

Service Discovery - Client

7

7

What about the User?

Service Discovery - Client

7

7

We want calm!

Service Discovery - Client

User Overwhelmed

7

7

Service Discovery - Service

8

8

Service Discovery - Service

8

8

Service Discovery - Service

What about the Service?

8

8

Service Discovery - Service

We want calm!

Service Overwhelmed

8

8

Motivation

9

9

Motivation

“Scalability is a critical problem in pervasive computing.” [Satyanarayanan 2001]

The density of interactions with any particular entity falls off as one moves away from it. [Satyanarayanan 2001]

Designers should divide the work into physical environment with boundaries that demarcate their content. [Kindberg 2001]

9

9

Motivation

“Scalability is a critical problem in pervasive computing.” [Satyanarayanan 2001]

The density of interactions with any particular entity falls off as one moves away from it. [Satyanarayanan 2001]

Designers should divide the work into physical environment with boundaries that demarcate their content. [Kindberg 2001]

An Open Proximity Model for Scoping Service Discovery in

Pervasive Computing

+

9

9

Contribution

SoftwareEngineering

DistributedSystems

Networking

10

10

Contribution

SoftwareEngineering

DistributedSystems

Networking

10

10

Open Proximity Model

11

11

Proximity is defined as the state, quality, sense, or fact of being near or next

Proximity as a Concept

12

12

Proximity is defined as the state, quality, sense, or fact of being near or next

• Taxonomy

• Physical and Abstract

• Objective and Subjective

Proximity as a Concept

12

12

Proximity is defined as the state, quality, sense, or fact of being near or next

• Taxonomy

• Physical and Abstract

• Objective and Subjective

Proximity as a Concept

12

12

Proximity is defined as the state, quality, sense, or fact of being near or next

• Taxonomy

• Physical and Abstract

• Objective and Subjective

Proximity as a Concept

12

12

Proximity is defined as the state, quality, sense, or fact of being near or next

• Taxonomy

• Physical and Abstract

• Objective and Subjective

Proximity as a Concept

12

12

Proximity relationships (PR)

• Open and Idiosyncratic

• Composable

• Distributed Evaluation

• Dynamic

13

13

Proximity relationships (PR)

• Open and Idiosyncratic

• Composable

• Distributed Evaluation

• Dynamic

13

13

Proximity relationships (PR)

• Open and Idiosyncratic

• Composable

• Distributed Evaluation

• Dynamic

13

13

Proximity relationships (PR)

• Open and Idiosyncratic

• Composable

• Distributed Evaluation

• Dynamic

13

13

Proximity relationships (PR)

• Open and Idiosyncratic

• Composable

• Distributed Evaluation

• Dynamic

13

13

Open Proximity Model in a nutshell

14

14

Open Proximity Model in a nutshell

14

14

Open Proximity Model in a nutshell

14

14

Open Proximity Model in a nutshellProximity: Accept all incoming jobs from DCC in the 3rd floor

14

14

Open Proximity Model in a nutshellProximity: Accept all incoming jobs from DCC in the 3rd floor

14

14

Open Proximity Model in a nutshellProximity: Accept all incoming jobs from DCC in the 3rd floor

14

14

Open Proximity Model in a nutshell

DCC PDA

Proximity: Accept all incoming jobs from DCC in the 3rd floor

14

14

Open Proximity Model in a nutshell

DCC PDA

Proximity: Accept all incoming jobs from DCC in the 3rd floor

14

14

Open Proximity Model in a nutshell

Print Job

14

14

Model Components

15

15

Model Components

Object

15

15

Model Components

PropertiesObject

15

15

Model Components

ƒ

Proximity FunctionPropertiesObject

15

15

Model Components

+ + ƒ

Proximity FunctionPropertiesObject

15

15

Model Components

+ + ƒ

Proximity FunctionPropertiesObject

15

15

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Basic evaluation strategy

16

16

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Multicast

Selective evaluation strategy

17

17

Staged evaluation strategy

18

18

Staged evaluation strategy

18

18

Staged evaluation strategy

18

18

Staged evaluation strategy

18

18

Staged evaluation strategy

18

18

Staged evaluation strategy

18

18

• Compose functions as boolean formulas

• Tree composite

• Internar nodes: Operations

• Leaves: simpler functions

• Short-circuit evaluation

• Distributed evaluation

• Must be done by the programmer

Composite Proximity

OR

AND

f1 f2

AND

OR

f5f4

f3

(f1 && f2) || (f3 && (f4 || f5))

19

19

Open Proximity Model in AmbientTalk

20

20

AmbientTalk

• Distributed object-oriented language (Prototype-based)

• Event-driven concurrency based on actors [Agha86]

• Asynchronous message sends, with non-blocking futures

• Built-in engine for service discovery of remote objects

• Extensible language

• Powerful reflective and meta-programming layer

• Block closures, keyworded messages, interface with JVM

AmbientTalk: the project

• Started in 2005

• Small team: 3-6 people

• Interpreter

• Pure Java implementation

• Runs on J2ME/CDC phones

8

21

21

Service Discovery in AmbientTalk

AdvertisingQuerying

def hp := Printer.new(...);export: hp as: PrinterServer;

when: PrinterServer discovered: {|printer|printer<-addJob(job);

}

22

22

Extended Service Discovery in AmbientTalk

def hp := Printer.new(...);export: hp with: s_props in: euclidean(s_props,radius);

when: PrinterServer discovered: {|printer|printer<-addJob(job);

}with: c_props in: euclidean(c_props,radius);

QueryingAdvertising

23

23

Properties Syntax

• AT objects with new semantics (extended Mirror)

• They can capture variables from their lexical scope

• Changed normal object behaviour through MOP

• invokeField

• pass (serialization)

def props := properties:{

deftype PeerNode;

def name := “Smith”;

def x() {gps.getX()};

def y() {gps.getY()};

};

24

24

Properties Syntax

• AT objects with new semantics (extended Mirror)

• They can capture variables from their lexical scope

• Changed normal object behaviour through MOP

• invokeField

• pass (serialization)

def props := properties:{

deftype PeerNode;

def name := “Smith”;

def x() {gps.getX()};

def y() {gps.getY()};

};

24

24

Properties Syntax

• AT objects with new semantics (extended Mirror)

• They can capture variables from their lexical scope

• Changed normal object behaviour through MOP

• invokeField

• pass (serialization)

def props := properties:{

deftype PeerNode;

def name := “Smith”;

def x() {gps.getX()};

def y() {gps.getY()};

};

24

24

Properties Syntax

• AT objects with new semantics (extended Mirror)

• They can capture variables from their lexical scope

• Changed normal object behaviour through MOP

• invokeField

• pass (serialization)

def props := properties:{

deftype PeerNode;

def name := “Smith”;

def x() {gps.getX()};

def y() {gps.getY()};

};

24

24

Proximity Function Syntax• They are not sent through the network

• They can capture variables from their lexical scope

• Special mapping of formal parameters based on name convention

• The formal parameters are looked up in the target properties set

def euclidean(props, radius){ { |x,y,name| def d := ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt(); (d < radius).and: { (props.name <=> name) != 0 }; };};

25

25

Proximity Function Syntax• They are not sent through the network

• They can capture variables from their lexical scope

• Special mapping of formal parameters based on name convention

• The formal parameters are looked up in the target properties set

def euclidean(props, radius){ { |x,y,name| def d := ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt(); (d < radius).and: { (props.name <=> name) != 0 }; };};

25

25

def euclidean(props, radius){ def f := Functor.new( {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}); def g := Functor.new({|name|

(props.name <=> name) != 0 }); def composite := And.new(f,g); composite;};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

26

26

def euclidean(props, radius){ def f := Functor.new( {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}); def g := Functor.new({|name|

(props.name <=> name) != 0 }); def composite := And.new(f,g); composite;};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

26

26

def euclidean(props, radius){ def f := Functor.new( {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}); def g := Functor.new({|name|

(props.name <=> name) != 0 }); def composite := And.new(f,g); composite;};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

26

26

def euclidean(props, radius){ def f := Functor.new( {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}); def g := Functor.new({|name|

(props.name <=> name) != 0 }); def composite := And.new(f,g); composite;};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

26

26

def euclidean(props, radius){ composite: {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}and: {|name| (props.name <=> name) != 0 };

};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

27

27

def euclidean(props, radius){ composite: {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}and: {|name| (props.name <=> name) != 0 };

};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

27

Syntactic Sugar

27

def euclidean(props, radius){ composite: {|x,y| ((props.x - x).expt(2) +

(props.y - y).expt(2)).sqrt() < radius)}and: {|name| (props.name <=> name) != 0 };

};

Proximity Function Syntax• Composite to represent composition of functions

• Basic functions is a Functor

• Composite nodes are Boolean operations And/Or

• Evaluation is bottom-up, optimizing boolean cases (Order matters!)

27

Syntactic Sugar

27

Experiment Setup

5 nodes20 connections

5 nodes20 connections

28

28

Experiment Setup

5 nodes20 connections

8 nodes56 connections

5 nodes20 connections

5 nodes20 connections

15 nodes210 connections

Connections ≈ O(n2)28

28

Major Results

• Network layer used for service discovery in AmbientTalk:

• Does not meet all requirements needed to extend the service discovery

• Problems with:

• Measure data collision

• Define transmission velocity and retransmission rates

• Use of Java scheduler to measure time and not real scale time

29

29

Major Results

0

100.000

200.000

300.000

400.000

2 5 10 15 20 25 30 35 40 45 50

Dat

a se

nt (K

B)

Number of Nodes

AT2 OPM

30

30

Major Results

0

1.000

2.000

3.000

4.000

0 10 100 1000 10000

Sen

t D

ata

(KB

)

Properties array size

BES SES StES

31

31

Conclusions and Perspectives

32

32

Conclusions

1. Proximity Taxonomy and Proximity Relationships

2. Open Proximity Model

2.1.Three evaluation strategies proposed

2.2.trade-off between simplicity and efficiency

3. Open Proximity Model in AmbientTalk

3.1.Use of reflection and meta-programming facilities is very helpful

3.2.AmbientTalk’s network layer fails to meet several networks requirements

33

33

Perspectives

1. Improvements on OPM in AmbientTalk

2. A new communication layer for AmbientTalk

3. Publish-Suscribe Service Discovery

4. Context awareness

34

34

35

35

GRACIAS!!!

36

36