Context-aware Migratory Services in Ad Hoc...

Preview:

Citation preview

1

ContextContext--aware Migratory Servicesaware Migratory Servicesin Ad Hoc Networks*in Ad Hoc Networks*

Rutgers-Helsinki Ph.D. Student Workshop onSpontaneous Networking

8-12th May 2006

Oriana RivaUniversity of Helsinki, Dep. of Computer Science

oriana.riva@cs.helsinki.fi

*Joint work with Liviu Iftode (Rutgers), Cristian Borcea (NJIT)and Tamer Nadeem (Univ. of Maryland)

Connecting to Internet throughConnecting to Internet throughad hoc networksad hoc networks

Internet

How else can we exploit theHow else can we exploit thead hoc networkad hoc networkcharacteristics to support acharacteristics to support anew class of applications?new class of applications?

2

Ad hoc networks as service providersAd hoc networks as service providers

ü Enable a new class of services specific toubiquitous computing environments

üü AAcquire, process, disseminate real-timeinformation

ü Targets: region, activity, entity

Traffic Information from region at constantTraffic Information from region at constantdistance in front of the driverdistance in front of the driver

ü Requirements:• Service must be aware of its context• Service must adapt to user’s context

3

Entity Tracking ServiceEntity Tracking Service

ü Requirements:• Service must be aware of its target• Service must preserve its execution state over time

Spontaneous Monitoring ServiceSpontaneous Monitoring Service

ü Requirements• Transfer code from node to node• The service must be aware of its context

4

Requirements for services in ad hocRequirements for services in ad hocnetworksnetworks

ü Context-awareness• dynamism of services and request targets

ü User-driven adaptability• dynamism of user needs and operational context

ü Service continuity• due to context changes a node may become incapable

of hosting the service any longer• need to support stateful interaction

ü On-demand code distribution• nodes do not possess the code for any type of service

OutlineOutline

ü Motivations

ü Context-aware Migratory Services

ü Migratory Services Framework

ü Evaluation

ü Conclusions & Future Works

5

Migratoryservice

end-point

Migratory Services ModelMigratory Services ModelMS migration

Virtual client-service interactionPhysical client-service interaction

Clientend-point n1

C n3

MSState

n4

n5

MSState

MSState

Migratoryservice

end-point

Migratory Services ModelMigratory Services Model -- contcont’’dd

Clientend-point n1

C

Meta-service

n2

SMigratory service

MSState

n3

MSState

n4

n5

MSState

MSState

ü One-to-onemapping betweenclients andmigratory services

6

Example: Region monitoring ServiceExample: Region monitoring Service

Request

Migration

n1

C

MS

Response

n3

n4

MS Exit

Migration

Migration

n3

n1

Cn2

S

n5n5

Response

MS n4

MS

MS

Key ideas in Migratory ServicesKey ideas in Migratory Services

ü Capable of migrating to different nodes in thenetwork in order to effectively accomplish theirfunction

ü 3 basic mechanisms:• Monitor the context of interacting entities• Specify in context rules how the service execution is

context-dependent• Migrate the service from node to node and resume its

execution once migratedü Service migration is triggered by context changesü Service migration is transparent to the client

7

OutlineOutline

ü Motivations

ü Context-aware Migratory Services

ü Migratory Services Framework

ü Evaluation

ü Conclusions & Future Works

Migratory Services FrameworkMigratory Services Framework

8

Migratory Service ImplementationMigratory Service Implementationusing Smart Messagesusing Smart Messages

ü Smart Messages• implemented on a modified version of Sun’s Java K

Virtual Machine

ü Migratory Services• clients, migratory services, and meta-services are

Java programs that register with the framework• the framework maps these programs onto lower-

level SMs• SM self-routes using geographical and content-

based routing

Context ManagerContext Manager

ü Context data provided by the SM platform• location, time, speed using GPS• device status information

• neighbors list

ü MonitoredCxt identifiers are translated into SMI/O tags

ü Access to context data by polling or blocking oncorresponding SM tags

9

Context Rules andContext Rules and ValidatorValidator

ü Evaluate if a service computation can be“correctly” carried out on the current hosting node

ü If not, trigger migrationü CxtRules are service/client-specific policies

• inCxtRules – control on incoming data• outCxtRules – control on outgoing data

ü CtxRules are condition/action statements• Conditions are full binary trees of Boolean expressions

(comparisonNodes + combinationNodes)• Ex: < OR, <batteryLevel, EQUAL, low>,

<responseLocation, OUT_REGION, userRegion> >• Actions: migrate service, send update, accept/refuse

response,...

Communication ManagerCommunication Manager

ü Tasks:• Discover meta-services• Route messages between communicating end-points• Carry out service migration

ü Use naming conventions defined by SMü Two basic SM routing algorithms:

• geographical routing (similar to GPSR)• region-bound content-based routing (similar to

AODV)

10

Reliability ManagerReliability Manager

ü Fault-tolerance to onefailure

ü Inactive version of theservice on a secondarynode

ü In case of failure of theprimary version, thesecondary version cantake over the serviceprovisioning

ResponseResponse

Update

Update

Update

ResponseResponseResponseResponse

ActiveService

InactiveServiceClient

Timeout

Request

ResponseDelete

ResponseResponse

primarynode

secondarynode

OutlineOutline

ü Motivations

ü Context-aware Migratory Services

ü Migratory Services Framework

ü Evaluation

ü Conclusions & Future Works

11

Prototype Migratory Service:Prototype Migratory Service: TJamTJam

ü Predict traffic jams inreal-time

ü Traffic jams arelocally congestedphases in which carstravel at slow or zerovelocity

ü TJam utilizes twotypes of informationthat every car owns:• number of one-hop

neighboring cars• speed of one-hop

neighboring cars

num numnumber number

num num

speed speedspeed speed

speed speed

tjam number speed

jamtjam tjam

total

avg - minP = maxP ×max - min

avg - maxP = maxP ×min - max

P' = × P +(1- )× PNP = P' ×N

α α

TJamTJam:: TestbedTestbed ExperimentsExperiments

üü Ad hoc mobile network ofAd hoc mobile network of11 HP iPAQs with 802.1111 HP iPAQs with 802.11cards and GPScards and GPS

üü Use mobility tracesUse mobility tracesüü 11--2 hops communication2 hops communicationüü 2/3 neighbors2/3 neighbors

12

TJamTJam constantly executes in the userconstantly executes in the user--specified regionspecified region

0

400

800

1200

1600

2000

2400

2800

3200

3600

0 50 100 150 200 250 300 350 400

time (sec)

Loca

tion

(m)

user locationservice location/correct answerservice location/wrong answerupdatesuser range

TJamTJam: Simulations: Simulationsü ns-2 simulator with the CMU-wireless extensionsü microscopic traffic generator tool Micro-VTGü Goal: Investigate the scalability of migratory

services in large scale networksü Study based on the comparison of

• TJam-Smart: migratory service model implementation• TJam-Base: baseline centralized approach

ü Metrics• inter-response time• correct response generation time• packet utilization rate• response packets overhead

13

Simulations: effects of number of clientsSimulations: effects of number of clientsü highway of length 25km with 3 lanesü vehicles avg speed is 30m/s with a gap of 150mü 800 vehicles (500 vehicles active and 50 service

nodes)

0

0,01

0,02

0,03

0,04

0,05

0,06

0,07

50 100 150 200 250 300

Clients number

Cor

rect

resp

onse

gene

ratio

n tim

e (s

ec)

0

0,5

1

1,5

2

2,5

3

3,5

Inte

r-res

pons

e tim

e (s

ec)

Correct response generation time (Smart) Correct response generation time (Base)Inter-response time (Smart) Inter-response time (Base)

Simulations: effects of vehicles speedSimulations: effects of vehicles speed

0

0,01

0,02

0,03

0,04

0,05

0,06

10 20 30Vehicles speed (meter/sec)

Cor

rect

resp

onse

gene

ratio

n tim

e (s

ec)

0

0,5

1

1,5

2

2,5

3

Inte

r-res

pons

e tim

e (s

ec)

Correct response generation time (Smart) Correct response generation time (Base)Inter-response time (Smart) Inter-response time (Base)

ü 150 clients

14

OutlineOutline

ü Motivations

ü Context-aware Migratory Services

ü Migratory Services Framework

ü Evaluation

ü Conclusions & Future Works

ConclusionsConclusions

ü Migratory Services enables a new class ofservices in ad hoc networks• services quickly adapt to changes in the physical

environment, in the node capabilities, and networktopology

• service continuity to the clientü Experimental results demonstrate the feasibility

of our approachü Simulation results demonstrate the scalability

and efficiency of migratory services compared toa traditional centralized approach

15

Future WorksFuture Works

ü Extend migratory services to smart phonesusing Portable Smart Messages (J2ME CDC)

ü Experimental testbed of nokia 9500

ü Use migratory services to collect contextinformation of entities and environments• Integration with the Contory middleware

• Contory is a middleware for the provisioning ofcontext information on smart phones

oriana.riva@cs.helsinki.fi

Thank you!

Recommended