Mobile Computing – A Distributed Systems Perspective Prof. Nalini Venkatasubramanian Department of...

Post on 21-Dec-2015

222 views 5 download

Tags:

Transcript of Mobile Computing – A Distributed Systems Perspective Prof. Nalini Venkatasubramanian Department of...

Mobile Computing – A Distributed Systems Perspective

Prof. Nalini VenkatasubramanianDepartment of Computer Science

University of California, Irvine

Outline

The Future: Mobile and Pervasive Computing An Applications View A Content View

Multimedia Content QoS Basics and End-to-end support

A Systems View Device, Operating System Networks, Middleware Application, Content A Cross-Layer Approach to Systems Support

Supporting Cross Cutting Concerns (Security, Reliability, Heterogeneous Interoperability)

Pervasive Computing and Communication

Proliferation of devices System support for multitude of smart (mobile) devices

that • attach and detach from a distribution infrastructure• produce a large volume of information at a high rate• limited by communication and power constraints

Require a customizable global networking backbone. That can handle heterogeneous needs of applications

• Quality of Service (QoS), security, reliability That can make effective use of the underlying infrastructure

Intelligent Middleware is key to supporting application needs in a highly dynamic environment

In the last 5 years….. New devices w/ new capabilities

Data capture, storage, presentation

New apps Social networking,…. Multimedia applications, gaming, data capturing,

download/upload/streaming Information seek/notification

New network infrastructures DTN, WiMax, UWB,…

New computational infrastructure Cloud computing, grids…

New problems and challenges…

IntroductionIntroduction

Internet

GSM or CDMA

BSBS

Cell PhoneCell Phone

PDAPDA

LaptopLaptopWLANAccess Point

ad hoc network

Users

Networks

Applications

Mobile Devices

Mobile Ecosystem

Technology Incentive

Growth in computational capacityMM workstations with audio/video processing capabilityDramatic increase in CPU processing power Dedicated compression engines for audio, video etc.

Rise in storage capacityLarge capacity disks (several gigabytes)Increase in storage bandwidth,e.g. disk array technology

Surge in available network bandwidthhigh speed fiber optic networks - gigabit networksfast packet switching technology

Enabler: Mobile Communication Networks

Cellular - GSM (Europe+), TDMA & CDMA (US) FM: 1.2-9.6 Kbps; Digital: 9.6-14.4 Kbps (ISDN-like services)

Public Packet Radio - Proprietary 19.2 Kbps (raw), 9.6 Kbps (effective)

Private and Share Mobile Radio Wireless LAN - wireless LAN bridge (IEEE 802.11)

Radio or Infrared frequencies: 1.2 Kbps-15 Mbps

Paging Networks – typically one-way communication low receiving power consumption

Satellites – wide-area coverage (GEOS, MEOS, LEOS) LEOS: 2.4 Kbps (uplink), 4.8Kbps (downlink)

Mobile Network Architecture

FIXED NETWORK

PDA

FIXEDHOSTBASE

STATION

BASESTATION

BASESTATION

Mbps to Gbps

MOBILE HOST

WIRELESS LAN CELL2Kbps - 15Mbps

WIRELESS RADIO CELL9Kbps - 14Kbps

BASESTATION

PDA

Wireless network characteristics

Variant Connectivity Low bandwidth and reliability

Frequent disconnections • predictable or sudden

Asymmetric Communication Broadcast medium

Monetarily expensive Charges per connection or per message/packet

Connectivity is weak, intermittent and expensive

Device Characteristics

Battery Power restrictions Transmit/receive, disk spinning, display, CPUs,

memory consume powerResource constraints

Mobile computers are resource poor Reduce program size Computation and communication load cannot be

distributed equally Small screen sizes

Mobility Characteristics

Location changes• location management - cost to locate is added to communication

Heterogeneity in services bandwidth restrictions and variability

Dynamic replication of data• data and services follow users

Querying data - location-based responses Security and authentication

System configuration is no longer static

Challenges

ChallengesChallenges

Glo

bal

Con

text

Netw

ork

Context

Need high degree of “network awareness” and “customizability”congestion rates, mobility patterns etc.QoS driven resource provisioningHeterogeneous networks

Dev

ice

Conte

xt

Heterogeneous devicesLimited battery lifetimeSize/weight limitationsComputation/Communication constraints

Application

Context

Application Context Increasing QoS., security, reliability demandsSoft Real Time Constraints Support for traditional media (text, images) and continuous media (audio/video)Synchronization (e.g. lip sync., floor control)

System support for multitude of componentsAttach and detach from a distributed infrastructureDeal with large vol. of information at a high rateChanging global system state

Mobile Multimedia – Rich Media applications on mobile devices

Challenges• Soft Real time Requirements• High demands on CPU / Network• Loss in performance directly affects user perception

Opportunities• Predictable regular behavior allows for interesting optimizations and

adaptations

Wide Area Network

Wireless Network

Low-powermobile device

Access pointMEDIA SERVER Video request

Video stream

OBJECTIVE : Stream rich multimedia content at highest possible quality (user experience) over wired and wireless networks

Multimedia Information Systems: Challenges

Sheer volume of dataNeed to manage huge volumes of data

Timing requirementsamong components of data computation and communication.Must work internally with given timing constraints - real-time

performance is required.

Integration requirementsneed to process traditional media (text, images) as well as

continuous media (audio/video).Media are not always independent of each other - synchronization

among the media may be required.

High Data Volume of Multimedia Information

Speech 8000 samples/s 8Kbytes/s

CD Audio 44,100 samples/s, 2bytes/sample

176Kbytes/s

SatelliteImagery

180X180 km 2̂30m 2̂ resolution

600MB/image(60MBcompressed)

NTSC Video 30fps, 640X480pixels, 3bytes/pixel

30Mbytes/s(2-8 Mbits/scompressed)

Quality of Service in MM Applications

QoS: A Design Parameter for MM Minor violations of

performance requirements

Generally used to express constraints on Timing, availability, reliability,security, resource utilization

User

NetworkMM devices

System

Application

(Network QoS)(Device QoS)

(System QoS)

(Application QoS)

(Perceptual QoS)

(Operating and Communication System)

QoS Classes

QoS Service Classes determine reliability of offered QoS utilization of resources

Guaranteed Service Class QoS guarantees are provided based on deterministic and statistical QoS

parameter values. Predictive Service Class

QoS parameter values are estimated and based on the past behavior of the service

Best-effort Service Class No guarantees or only partial guarantees provided No QoS parameters are specified or some minimal bounds are given.

Supporting continuous media: Approaches

Admission controlProvide different service classes

Fast storage and retrieval of Multimedia contentOptimized organization (placement) of multimedia

files on diskSpecial disk scheduling algorithms

Efficient Memory ManagementSufficient buffers to avoid jitter Intelligent Caching

End-to-end QoS for Wired Applications

Usually achieved through QoS Brokers Coordinates interactions between multiple sessions

with QoS needs

Typical Functions of a QoS broker Resource Provisioning

Deal adaptively with incoming requestsAllocate server, network and client resources

Predictive and Adaptive Data Placement Re(configure) data to service requests more efficiently

Must maintain resource allocation invariants

Supporting QoS in Mobile Applications

New challenges Constantly changing system conditions

Network connectivity, user mobility

Device constraints Energy, CPU, display, bandwidth

This needs Provisioning, re-provisioning based on local conditions of wireless network Data Placement based on current and projected data access patterns

Cross-layer awareness required Resource provisioning algorithms utilize current system resource availability

information to ensure that applications meet their QoS requirements

QoS-based resource provisioning

Provisioning Network and Server Resources Effectively State information enables decision making for resource provisioning - e.g. Routing,

Scheduling and Placement Maintaining accurate and current system information is important

Existing Approaches In network : QoS Based Routing At Server : Server Load Balancing

Future Middleware will support CPSS (Combined Path and Server Scheduling)

lDLlavailBWl ,:

s1

s2

s3

O

O

s1

s2

s3 CD

lDLnrlUFl ),,,(:

sRSPnrsUFs ),,,1(:

Data Placement in Mobile Environments

S3

v6 v5

v3 v4

S2

v5 v6

v1 v2

S1

v1 v2

v3 v4

S2

v5 v6

v1 v2

S1

v1 v2

v3 v4

Initial placement

After replication degree enforcement

S3

v1 v2

v3 v4

Design replication and intelligent

data placement mechanisms that Ensure effective resource

management Ensure QoS for admitted clients

Design caching mechanisms

Partition data/processing between mobile clients and infrastructure

Allows disconnected operation

Efficient power management

Need for a Cross Layer Approach

Information exchange needed To provide information good enough for resource provisioning tasks

such as admission control, load balancing etc.Need an information collection mechanism that is :

• is aware of multiple levels of imprecision in data

• is aware of quality requirements of applications

• makes optimum use of the system (network and server) resources

Sample Parameters Network link status, Data server capacity (Remote disk bandwidth,

Processor capacity), device constraints (battery power, memory limitations)

Case Study: Power Management Power Optimization in battery operated mobile

devices is a crucial research challenge Devices operate in dynamic distributed environments Power Management strategies need to be aware of

global system state and exploit it.

NETWORK CARD

DISPLAY

CPU

Display

NIC

CPU

Misc.

Existing Work in Power Optimization

Architecture

Architecture(cpu, memory)

• Soderquist (ACM Multimedia 97)• Azevedo (AWIA 2001)• Hughes, Adve (MICRO 01, ICSA 01)• Brooks (ISCA 2000), Choi (ISLPED 02)• Leback (ASPLOS 2000), Microsoft’s ACPI

• Flinn (ICDSP 2001), Yau (ICME 2002)• Krintz, Wolski (ISLPED 2004)• Noble (SOSP 97, MCSA 1999)• Li (CASES 2002), Othman (1998)• Abeni (RTSS 98)•Rudenko ( ACM SAC 99), Satyanarayan (2001)

Power Optimization has been extensively researched

Network

Network Interface Card

• Chandra (MMCN 04,02, USENIX 2002, ICPP 04)• Shenoy (ACM MM 2002) • Feeney, Nilson ( Infocom 2001)• Katz (IEICE 97)

Operating System

DVS, DPM, DriverInterfaces, system calls

• Ellis, Vahdat (IEEE pervasive 05, Usenix 03, ASPLOS 02) • Hao, Nahrstedt (ICMCS 99, HPDC 99, Globecom 01)• Yuan (MMCN 03,04, SOSP 03, ACM MM 04), • Rajkumar (03), Anand (Mobicom 03, Mobisys 04) • DVS (Shin, Gupta, Weiser, Srivastava, Govil et. al.)• DPM (Douglis, Hembold, Delaluz, Kumpf et. al.)

User/Application

Quality of Service Application/user feedback

Limitations of Current Approaches

Limited co-ordination between the different system layers• Address concerns at one or two system levels• Make assumptions about adaptations at other system levels (lack awareness)

Device Centric • Cannot exploit global system knowledge (e.g. congestion, mobility, location)• Reactive Adaptations

Lack of generalized framework

ServerWired

Network Proxy WirelessNetwork

Client

Illustration

Client

Client

Client

congestion

What if new applications are started or residual

battery energy changes?

Power-aware middlewareA power-cognizant distributed middleware framework can

o dynamically adapt to global changeso co-ordinate techniques at different system levels o maximize the utility (application QoS, power savings) of a low-power device.o study and evaluate cross layer adaptation techniques for performance vs. quality vs. power tradeoffs for mobile handheld devices.

Wide Area Network

Wireless Network

Low-powermobile device

proxy

Use a Proxy-Based Architecture

Execute Remote Tasks

Caching Compression

State Monitor

Traffic Shaping

Compositing

Transcoding

server

Use proxy to dynamically adapt to

global changes

Coordinate techniqueson device

Power-Aware Adaptive Middleware

Architecture

Architecture(cpu, memory)Network

Operating System

Middleware

Distributed Adaptation Cross-Layer AdaptationAppl. specific Adaptation

• DYNAMO SYSTEMMohapatra et. al (ICN 05, ITCC 05, ACM Middleware 04, DATE 04, ICDCS 03, MWCN 03, ACM MM 03, RTAS/RTSS Workshops 03, Estimedia 03, CIPC 03, ICDCS 01)

Distributed Adaptation Cross-Layer Adaptation

Power-Aware API

User/Application

Quality of Service Application/user feedback

Cross-Layer Approach

device

Architecture

Operating System

Distributed Middleware

User/Application

LOCALCROSS LAYER ADAPTATION

1. Expose “state” information to other layers

2. Design strategies at each layer to dynamically adapt to changes at other layers

Proxy

network

Middleware

GLOBAL (End-to-End)PROXY BASED ADAPTATION

1. Design end-to-end adaptations that can exploit global state (network noise, mobility patterns, device state etc.)2. Use control information to notifymobile device of adaptations3. Adapt strategies on device

Energy-Sensitive Video Transcoding for Mobile devices

► We conducted a survey to subjectively assess human perception of video quality on handhelds.► Hard to programmatically identify video quality parameters

► We identified 8 perceptible video quality levels that produced noticeable difference in power consumption (Compaq iPaq 3600)

5.38 W3.88 WQSIF, 20fps,100kbpsQ8 (Terrible)

5.5 W3.95 WQSIF, 20fps, 150KbpsQ7 (Bad)

5.63 W4.06 WHSIF, 24fps, 150KbpsQ6(Poor)

5.73 W4.15 WHSIF, 24fps, 200KbpsQ5 (Fair)

5.81 W4.24 WHSIF, 24fps, 350KbpsQ4 (Good)

5.86 W4.31 WSIF, 25fps, 350KbpsQ3 (Very Good)

5.99 W4.37 WSIF, 25fps, 450KbpsQ2 (Excellent)

6.07 W4.42 WSIF, 30fps, 650KbpsQ1 (Like original)

Avg. Power (Linux)

Avg. Power (Windows CE)

Video transformation parameters

QUALITY

VIDEO TRANSCODING PARAMETERS

Quality/Power Matrix for COMPAQ IPAQ 3600 ( Grand Theft Auto Action Video Sequence)

Energy-Sensitive Video Transcoding: Visual Comparison

Parameters varying: frame size, bit-rate, frame rate• Profile power for each quality• Optimize system for each quality

Quality 1(like original)

Avg. Power : 6.24 W

Quality 4(good)

Avg. Power : 5.81 W

Quality 7(bad)

Avg. Power : 5.41 W

Energy-Aware Video Transcoding

Residual Energy (ERES)User defined Quality (Qthreshold)

ProxyMobileDevice

QSTREAM = Max(Qi) such that PSTREAM * T < ERES

QSTREAM > QTHRESHOLDQSTREAM = Video streamed by proxy

Qthreshold = Threshold quality level acceptable to the userPSTREAM = Avg. Power consumption for video playbackERES = Residual Energy of deviceT = Time of playback

Video Stream (QSTREAM)

0

2

4

6

8

10

12

Q1 Q2 Q3 Q4 Q5 Q6

No

rmal

ized

En

erg

y sa

ved

(%

)

Energy-Aware Application Adaptation

CPU NICLinux OS

Dynamo Middleware

DISPLAY

NIC

CPU

Mobile Device

Dynamo Middleware

Proxy

Wireless Network

Wireless Network

QoS

Monitor

Application

UserProfile

Negotiation

CommunicationE-Q profileTranscoder

Network Card Optimization

Wireless NIC cards can operate in various power modes Avg. power consumption in sleep mode (0.184 W) whereas idle/receive modes

consume (1.34/1.435 W) respectively. NIC can be transitioned to sleep mode (high energy savings) Packets can get lost (quality drop)

Adaptation Proxy buffers video and sends it in bursts to the device Control info added - when device should wake up

Allows for long sleep intervals of the network card on device

Limitations Large bursts can result in high packet loss rates Access point and mobile device buffering limitations

Adaptation at Proxy

Residual Energy, Quality threshold+ Noise (SL), Buffer capacity (Bf), Decode rate (Fd)

ProxyMobileDevice

Video Stream (QSTREAM)# of frames, buffer size, quality

QSTREAM = Max(Qi) such that PSTREAM * T < ERES

QSTREAM > QTHRESHOLD

Set local buffer size based on noise level (empirical)Fix quality level (Qi) to be streamed (QSTREAM ... QTHRESHOLD)

Let N = number of transcoded frames in local buffer

Burst Size (I) = N / Fd

Send next burst after I seconds.

Adaptation at Mobile Device

ProxyMobileDevice

Video Stream (QSTREAM)

# of frames (N), buffer size, quality, σ

Burst Size (I) = N / Fd

Worst case transmission delay of burst (D) = σ x TAP

Therefore total sleep time (δ) for NIC at the device δ = I – D + γ. DEtoE

total number of packets at the Access Point

Psaved ≥ δ x (PIDLE - PSLEEP)

Switch network card to “sleep” mode for δ seconds after receiving video

Network Card Adaptation in Dynamo

CPU NICLinux OS

Dynamo Middleware

DISPLAY

NIC

CPU

Mobile Device

Dynamo Middleware

Proxy

Wireless Network

Wireless Network

QoS

Monitor

Application

UserProfile

Negotiation

Communication

NIC adaptation

Network Transmission

E-Q profile

Transcoder

Network Energy Savings NIC

CPUBacklight

399 FramesEnergy Savings – 50% - 75% (over no optimization)Frames Lost – < 5%

1738 FramesEnergy Savings – 35% - 57% (over no optimization)Frames Lost – < 12%

2924 FramesEnergy Savings – 25% - 45% (over no optimization)Frames Lost – < 10%

Backlight Compensation

Adaptation1) Enhance luminance of video frames at proxy

2) Dim backlight on the device to compensate luminance enhancement

Problems Technique to achieve the suitable (optimal) backlight dimming factor Reduce flicker induced by frequent backlight switching

Backlight AdaptationBacklightLevel

Quality(PSNR)

PowerSavings

Fair 149 30.17 41.8%Good 162 34.28 36.7%Excellent 205 42.31 27.3%

BacklightLevel

PowerSavings

Fair 80 44.8%Good 125 39.7%Excellent 186 30.3%

BacklightLevel

PowerSavings

Fair 172 34.8%Good 162 27.7%Excellent 205 21.4%

Backlight Adaptation in Dynamo

Residual Energy, Quality threshold+ Noise (SL), Buffer capacity (Bf), Decode rate (Fd)

ProxyMobileDevice

Video Stream (QSTREAM)# of frames, buffer size, quality+ Backlight Setting

Stream luminance compensated video

Use backlight quantization table to

set backlight

Backlight Adaptation using Dynamo

CPU NICLinux OS

Dynamo Middleware

DISPLAY

NIC

CPU

Mobile Device

Dynamo Middleware

Proxy

Wireless Network

Wireless Network

QoS

Monitor

Application

UserProfile

Negotiation

Communication

NIC adaptor

Network TransmissionE-Q profile

Transcoder

Backlightadaptor

B/L Scaling

NIC

CPUBacklight

Architecture/CPU Adaptation DVS idea: trade off processor speed for power MPEG frame decoding – good candidate

Frame decoding takes less than the frame delay Decoding time – depends on frame type: I, P, B

I B B B B PP

MPEG Stream

0 time

Vo

ltag

e

FdD

with DVS

no DVS

CPU Adaptation using Dynamo

Residual Energy, Quality threshold+ Noise (SL), Buffer capacity (Bf), Decode rate (Fd)

ProxyMobileDevice

Video Stream (QSTREAM)# of frames, buffer size, qualityBacklight Setting + Profiled WCET, BCET, Avg. Execution time

• Middleware communicates execution characteristics to scheduler• Scheduler can now dynamically re-compute slowdown parameters for the new video quality

• Determine video quality • Use a rule base of profiled data to send execution parameters to the mobile device

Linux OS

CPU Adaptation

scheduler

Dynamo Middleware

DISPLAY

NIC

CPU

Mobile Device

Dynamo Middleware

Proxy

Wireless Network

Wireless Network

QoS

Monitor

Application

UserProfile

Negotiation

Communication

NIC adaptor

Network Transmission

Backlightadaptation

CPUadaptation

Rule BaseE-Q profile

B/L ScalingTranscoder

Overall Energy Savings

Network (37.7%)

Display (26.9%)

CPU (27.2%)

Other (8.2%)

Other (8.2%)

Network (15.09%)

NIC Savings (22.64%)

Display (14.8%)

DisplaySavings (12.1%)

CPU (13.6%)

CPU Savings(13.6%)

Energy Distribution(Before Optimization)

Energy Distribution(After Optimization)

Note: These are avg. energy savings

Total energy savings ~ 48% (for a medium action video clip called Foreman)

After Cross-LayerOptimizations

• Avg. Battery lifetime of the mobile device increases by approximately 2 times its original lifetime under similar load (i.e. battery power consumption).

Implications for a commercial PDA

Secure Mobile Multimedia – Energy Implications

Mobile multimedia applicationsare vulnerable to security attacksin wireless networks Significant computation for video encryption is expectedon battery-operated mobiles

InsecurenetworkSymmetric

EncryptionTechnique

Video Encoder

Secure Video Encoder

Attacks

SymmetricDecryptionTechnique

Video Decoder

Secure Video Decoder

Encoding without Encryption

Encoding with Encryption (Selective)

Encoding with Encryption (Naïve)

0

10

20

30

40

50

60

70

8090

FOREMAN.qcif NEWS.qcifVideo Clips

Me

as

ure

d E

ne

rgy

(J

ou

les

)

Negligible Energy OverheadExperimental Study

Battery-OperatedDevices

▶ Evaluate symmetric videoencryption schemes w.r.t. energy

Problem and Motivation

Reliable Mobile Multimedia – Energy Implications

Problem and Motivation

Video streams over a wireless networkData loss Error control

•Channel coding : FEC, Retransmission•Source coding: Error-resilient coding

PNSR Variation

0

6

12

18

24

30

36

1 3 5 7 9

11

13

15

17

19

21

23

25

27

29

31

33

35

37

39

41

43

45

47

49

Frame Number

PSN

R (

dB)

PBPAIR PGOP-1 GOP-8 AIR-10

Encoding Energy Consumption (iPAQ)

0

5

10

15

20

25

foreman akiyo garden

Enco

ding

Ene

rgy

(J)

NOPBPAIRPGOP-3GOP-3AIR-24

0 0.2 0.4 0.6 0.8 10

0.3

0.60.9

0

5

10

15

20

25

Enco

ding

En

ergy

(J)

PLR

Intra_Th

Encoding Energy Consumption (iPAQ)

0-5 5-10 10-15 15-20 20-25

Energy efficiency Fast recovery Flexibility

Experimental Study

Probability Based Partial intra-coding trade-offs among error resiliency, encoding efficiency, energy consumption

Most energy consuming operation Avoiding ME can improve energy profile at the cost of encoding efficiency High impact on image quality

Making ME algorithm robust against packet loss can improve error resiliency

Idea: ME (Motion Estimation) is..

Multiplexing,Packetizing& ChannelEncoding

ME DCT Q VLC

Video Encoder

RawVideo

LossyNetwork

Mobile Mobile Grid/Cloud Grid/Cloud Computing Computing

Dealing with mobility

Proxy must be close to device for effectiveness Idea – use a network of proxies and identify how to

use the proxy network for multiple moving devices…Where to obtain proxies

Fixed backbone infrastructure (Akamai)– Could be effective, but proprietary

Grid infrastructure (MAPGRID)– Open access, but intermittently available

Cloud infrastructure (Charisma)– Open access, limited ability to tailor use of proprietary

backbone resources

Observations (I) – Proxy-based Techniques

Network proxies support for mobile applications, e.g.: Proxy caching:

[Hadjiefthymiades WWW01], [Xu TKDE04],[Wang TM 07], etc.

Proxy-based content transcoding: [Shenoy, MMCN03] [Change EUROMICRO Journal 07], etc.

Offloading tasks: [Kejariwal, Trans VLSI 06], [Mohapatra, ACM 2003],[ Li, NOSSDAV 2003], etc.

► Grid/Cloud infrastructure support for implementing proxy-based solutions, e.g: using grid machines as proxies for mobile applications [Phan MobiCom 02]

► Online Server or third party Storage► e.g. iPhone 3G MobileMe keeps all user information in the “cloud”

Observations (II)- Context Awareness and Predictability

Importance of Context information, e.g. Enabling mobile applications:

Location-based services

Achieving service flexibility and adaptability: Layered video transcoding [Shanableh Transaction of Multimedia 05], etc.

Improving system performance: Mobility-aware data allocation (increasing cache hit ratio) [Peng ICPP00], etc.

Predictability and Patterns of Context Exploited for improving handoff performance, reducing task failure rate and dynamic

resource allocation, etc Mobility prediction [Song, IEEE Transaction on Mobile Computing 06] Mobility models [ MCNett SIGMOBILE review 05] [Hong MSWiM99] Characterizing resource availability in desktop grids [Kondo FGCS 07]

MAPGrid: A New ParadigmGrid Enabled Mobile Applications

VS 3

VS 2

VS 1

Broker

Research Challenges Resource Discovery

Application aspect Ensure user QoS satisfaction

System View Define an “optimal” grid resource allocation

• User mobility• resource heterogeneity• Grid intermittent availability

Adapt to changing context • User mobility, device energy, and proxy availability

► Data Placement Application aspect

► Guarantee data availability► Improve information retrieval efficiency with user mobility

System View► Address both short term on-demand caching and long term data placement ► Make caching or data replication at finer granularity► Balance availability efficiency tradeoff

MapGrid

Uses (idle) grid computing resources as the intermediate node cache proxy for mobile applications.

Resources on grid (storage and computation) are intermittently available. MapGrid uses the interval tree data structure for storing the information

about available resources on grid. Mobility pattern has been used to optimal data replication policy in

MapGrid.

56

Mobile Mobile ClientClient

BrokerBroker

Mobile ClientMobile ClientMonitoringMonitoring

Directory Directory ServiceService

Request Request SchedulerScheduler

Resource Resource ReservationReservation

Placement Placement ManagementManagement

Tertiary Tertiary StorageStorage

Volunteer Servers(Grids)

Grid Grid MonitoringMonitoring

MapGrid Middleware Service ArchitectureMapGrid Middleware Service Architecture

ReqReq

InfoInfo

Moving_ProfileMoving_Profile

ReqReqReq*Req*

Req#Req#

Req@Req@

DataData

1. Resource Discovery2. Schedule Planning

1. Resource Discovery2. Schedule Planning

Reports changes in grid resources

Reports changes in grid resources

Admission ControlAdmission Control

Contains information about available resources on Grid

and Clients

Contains information about available resources on Grid

and Clients

Replace the data to grid resources

Replace the data to grid resources

Mobility Pattern detectionMobility Pattern detection

57

MapGrid Request: R(VID, itinerary) where VID is the video and itinerary is mobility

information. Grid Loading Factor:

Grid Factor:

10 j. gridon resource available to

resource requested of ratio theis X where

},,,max{),(

a

j

aaaaj

LF

DBWNBWMEMCPUtRLF

),(),(

),(),(

RjDisttRLF

tjtyAvailabilitRGf

jj

If grid j is available at time t equal 1 else 0.

If grid j is available at time t equal 1 else 0.

Distance of grid J from request R.

Distance of grid J from request R.

58

Grid Resource Discovery for Mobile Services

Partition Service Period

All chunks have VS assignments?

Proxy (VS) Selection

Y

N

• apply mobility or location information• choose the number of chunks (partition)

• decide the size of each chunk

• choose available VSs• choose lighter loaded VSs

• choose “closer” VSs• Satisfy different QoS reqirements on service

response time, service continuity…

Rescheduling if dynamic changes happen

R: < IDR: < IDRR , T , Q , T , QL L , Q, QHH, , , , EERR , itinerary> , itinerary>

• Rescheduling when device has no enough residual energy for the current QoS level

• Rescheduling when grid node fails

Grid Resource Discovery for Mobile Services

Partition Service Period

All chunks have VS assignments?

Volunteer Server Allocation

Y

N

Problem:► Determine number of partitions and size of

each partitionMachine learning approach using mobility info

Rescheduling if dynamic changes happen

Grid Resource Discovery for Mobile Services

Partition Service Period

All chunks have VS assignments?

Volunteer Server Allocation

Y

N

Rescheduling if dynamic changes happen

Optimizing grid resource selection► Factors: Load, location, availability,

capacity ► Achieve system-wide load balancing ► Maximize the number of accepted

servicesGraph theoretic approach

Grid Service Discovery (Multimedia Application)

P2-T2

0

1000

2000

3000

4000

5000

6000

7000

8000

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49

time (hours)

num

be

r o

f re

ject

ion

s

IS-C-SS

IS-C-MS

DS-C-SS

DS-C-MS

DS-D-SS

DS-D-MS

P2: Deterministic data placementP2: Deterministic data placementT2: Random VS availabilityT2: Random VS availability

Collections of services support by Collections of services support by grid significantly increases grid significantly increases

request acceptance and request acceptance and Completion ratios Completion ratios

Uncompleted requests when VSs become unavailable simultaneously

1036

6982

116 118

146168

190

224 231

266

0 0 0 0 0 0 0 0 11

193

104

0

50

100

150

200

250

300

1 2 3 4 5 6 7 8 9 10 11 12

number of VSs that become unavailable simultaneously

nu

mb

er o

f re

qu

ests

th

at

can

no

t b

e co

mp

lete

d no adaptation

with adaptation

MAPGrid Prototype

Client

Volunteer Servers

BrokerGlobus Toolkit

The Volunteer Server can join and disjoin the grid dynamically .

Failure detection for both client and VSs using Globus life time management control.

Data

Information Services

Life time control

GridFTP

JMF (Java Media Framework)

JADEHttp

Client can specify QoS requirements via friendly GUI

Mobile Cloud Mobile Cloud ComputingComputing

What is Cloud Computing

Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services).

It can be rapidly provisioned and released with minimal management effort.

It provides high level abstraction of computation and storage model.

On-Demand Self Service, Heterogeneous Access,Resource Pooling.

Essential Characteristics

On-Demand Self Service: A consumer can unilaterally provision computing

capabilities, automatically without requiring human interaction with each service’s provider.

Heterogeneous Access: Capabilities are available over the network and accessed

through standard mechanisms that promote use by heterogeneous thin or thick client platforms.

66

Resource Pooling: The provider’s computing resources are pooled to serve multiple

consumers using a multi-tenant model. Different physical and virtual resources dynamically assigned and

reassigned according to consumer demand.

Measured Service: Cloud systems automatically control and optimize resources used

by leveraging a metering capability at some level of abstraction appropriate to the type of service.

It will provide an analyzable and predictable computing platform.

67

Essential Characteristics (cont.)

Service Models Cloud Software as a Service (SaaS):

The capability provided to the consumer is to use the provider’s applications running on a cloud infrastructure.

The applications are accessible from various client devices such as a web browser (e.g., web-based email).

The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage,…

Examples: Caspio, Google Apps, Salesforce, Nivio, Learn.com.

68

Cloud Platform as a Service (PaaS): The capability provided to the consumer is to deploy onto the

cloud infrastructure consumer-created or acquired applications created using programming languages and tools supported by the provider.

The consumer does not manage or control the underlying cloud infrastructure.

Consumer has control over the deployed applications and possibly application hosting environment configurations.

Examples: Windows Azure, Google App.

69

Service Models (cont.)

Cloud Infrastructure as a Service (IaaS): The capability provided to the consumer is to provision

processing, storage, networks, and other fundamental computing resources.

The consumer is able to deploy and run arbitrary software, which can include operating systems and applications.

The consumer does not manage or control the underlying cloud infrastructure but has control over operating systems, storage, deployed applications, and possibly limited control of select networking components (e.g., host firewalls).

Examples: Amazon EC2, GoGrid, iland, Rackspace Cloud Servers, ReliaCloud.

70

Service Models (cont.)

Service Model at a glance: Picture From http://en.wikipedia.org/wiki/File:Cloud_Computing_Stack.svg

71

Service Models (cont.)

Deployment Models Private Cloud:

The cloud is operated solely for an organization. It may be managed by the organization or a third party and may exist on premise or off premise.

Community Cloud: The cloud infrastructure is shared by several organizations and supports a

specific community that has shared concerns. It may be managed by the organizations or a third party and may exist on

premise or off premise.

Public Cloud: The cloud infrastructure is made available to the general public or a large

industry group and it is owned by an organization selling cloud services.

Hybrid cloud: The cloud infrastructure is a composition of two or more clouds (private,

community, or public).

72

Service Model at a glance: Picture From http://en.wikipedia.org/wiki/File:Cloud_computing_types.svg

73

Deployment Models (cont.)

Evolution of Computing Environment: Evolution of Computing Environment: [Satyanarayanan_2001] : [Satyanarayanan_2001] :

Toward Pervasive Computing environmentToward Pervasive Computing environment74

Cloud Cloud Computing Computing

PromisesPromises

Towards Pervasive Computing

Cloudlet It has been shown that a one hop connection from mobile

device to internet is not efficient. Humans are sensitive to the current delay in clouds

latency is unlikely to improve significantly security and firewall it is unlikely that latency improves (although

increase in bandwidth).

Cloudlet Between mobile devices and cloud pools (Infrastructure).

A cloudlet (micro edition of cloudmicro edition of cloud)only contains soft states such as cache copies of data or code.

75

Cloudlets are as the infrastructure for mobile cloud computing. From: [Satyanarayanan_2009]

76

The prototype based on this systems is implemented in CMU and called Kimberley [Satyanarayanan_2009] .

Cloudlet (cont.)

77

Dynamic Task Reconfiguration

How can we support dynamic task/service reconfiguration to achieve energy gains (i.e. migrate computationally expensive tasks from the device to the proxy and use the results locally)

Approach:Identify “energy intensive” components that can be dynamically migrated to a proxy► What to reconfigure?

computation/communication characteristics of tasks (use Profiling) Current residual power of the device

► When to reconfigure? Identify set of policies that dictate how often or under what conditions reconfigurations should be initiated

78

Dynamo: Dynamic Task Reconfiguration

►Cast the distribution problem as a “Source Parametric Flow Network”.

►Use Current residual energy at device to make the flow graph “source parametric”

How to maintain an optimized component distribution under dynamic device power conditions?

Problem

Solution

79

Source Parametric Flow Graph

D P

device proxy

Rd

Rp

Runtime on Device

Runtime on Proxy

M1

M2

Mn

A1

Ai = Energy cost of

executing task Mi at the

proxy.

infinite

Ap

A2

An

B1

Bi = Energy cost of

executing task Mi at the device.

Bd

infin

ite

B2

Bn

X1

Yn

• If Mi is executing on the Device, then Xi = communication costs in energy terms

• If Mi is executing on the Proxy, then Yi = communication costs in energy terms

Xn

Y1

Y2

X2

80

High Level Algorithm► The minimum cut of the graph determines which

components can be moved to the proxy.► Can be solved using a modified FIFO Pre-Flow push

algorithm. ► Complexity = O(n3)

FOR (each reconfiguration interval) DOBEGIN

o update list of components/residual energy on device

o generate network flow grapho determine component partitioning (min cut)

o IF (new partition) o reconfigure components between device

and proxyEND

AlfredO Platform (ETH Zurich)

SaaS distribution model for physical services (MW 2008, 2009) Mobile Phones as universal interfaces to cloud applications Supports partition and distribution of modularized applications in a client-server setup

OSGI-based (Open Services Gateway Initiative) Focus on presentation and logic modules

81

Virtual ticket machineTurn the phone into an

interface for theticket machine

Home 3D Planner

AlfredO architecture and applications (MW 2009)

Component Based Architecture Supports optimal task migration between server and mobile client [Middleware 2009].

Generate an application graph and determine a cut (tasks done on server side and remaining will be done on mobile side) to meet the required optimization issues.

Premise: Modularized application and Model of resource consumption and dependencies among application modules

Goal: Partition the application between phone and server based on different criteria (bandwidth, memory)

83

S1 S2 S3

S4

S5S7

S6S6

S8

S1 S2 S3

S4

S5S7

S6

S8

Mobile CutMobile CutMobile CutMobile CutMobile CutMobile CutMobile CutMobile Cut

S1 S2 S3

S4

S5S7

S6

S8

Original PlanOriginal PlanAlfredO

AlfredO (MW 2009)

Just like ISPs cloud computing could be considered in different Tiers.

The backbone Cloud which usually large organization such as Google, Yahoo, Microsoft support them.

The second tier is edge Cloud which is near end user.

Tier 2-Cloud (Edge Cloud)

Tier 1-Cloud (Backbone Clouds,. Amazon EC2, Azure,… )

CHARISMA: Tiered Clouds

Mobile ClientMobile Client Middleware(Broker)Middleware(Broker) Cloudlet and Cloud Cloudlet and Cloud PoolPool

Cloud Service Registry and Discovery

AdmissionControl

Mobile Profile Monitoring

Qos Monitoring , Service Discovery

Scheduler

Mobile Client

Cloudlet Pools

Mobile Profile Analyzer

Qos Analyzer

Cloud Pools

Qos Monitoring

87

Middleware BlocksMiddleware Blocks FunctionalitiesFunctionalities

Admission Control Accepts or rejects mobile client requests according to the resources available and mobile profile (it could be power-aware, resource –aware and…. Policies, Maybe Game Theory could be used for optimal admission policy).

Mobile Profile Monitoring

Monitors mobile profile.

Mobile Profile Analyzer

Analyzes mobile profile specially power level, location pattern,… for optimal scheduling.

Scheduler It schedules the accepted requests and design a plan according to the negotiations done with Cloudlets (Schedule Queue).

Qos Monitoring, Service Discovery (Cloud and Cloudlets)

It discovers cloudlets (maybe based on ontology and semantics) in the area (like UDDI), its Qos during service from mobile client. It also registers its services and middleware business on UDDI for accessing mobile clients.

Qos Analyzer It is analyzing the Cloudlets services and make a list of suitable cloudlets and policy of admission.

Mobile Client Block Functionalities

Qos Monitoring Reports the Middleware about the Qos of the cloudlets.

Barcode Reader: Sample Application

Simple barcode reader service has been implemented. In this scenario the user takes a picture of the barcode for

getting some information about the object, for example the cheapest price location.

The picture is sent to cloudlet for processing. The cloudlet extracts the information and queries Amazon

or other clouds for price and returns back to the user

88

CloudCloudCloudletCloudlet

89

Cloud(Amazon)Cloud(Amazon)

CloudletCloudlet

Cloud(Yahoo)Cloud(Yahoo)

Yahoo Cloud (Flicker) as a Cache.

90

91http://www.youtube.com/watch?v=fQywFeN1wdM

Cloud computing

Remote access to distributed and shared cluster resources Potentially owned by someone else (e.g. Amazon, Google, …)

Users rent a small fraction of vast resource pools• Advertised service-level-agreements (SLAs)

• Resources are opaque and isolated

Offer high availability, fault tolerance, and extreme scale

Relies on OS, network, and storage virtualization/isolation

SLAs

Web Services

Virtualization

Ad Hoc

Future: Interoperable NetworkingHeterogeneous access technologies available

End devices equipped with multiple radio interfaces

Applications are run over the most efficient access

networks

802.11b

802.11a

Bluetooth

GPRS

UMTS

Wi-Fi

Cellular......

Reliable Secure QoS over

multiple access networks

Always Best Connected: Solution Components

access discovery

access selection

AAA support

mobility management

content adaptation

profile handling

• what accesses are currently available?• what are their bandwidth and delay?

• what access to choose; what is “best”?• user/network-based solution• one or multiple accesses in parallel

• session continuity, session transfer• support for real-time services

• authentication, authorization, accounting• accesses, services... single logon

• applications adapting to access & device

• personal profiles for ABC• access selection & content adaptation

Access Selection: Benefits Continual connectivity

Uninterrupted Internet access even when some of the access networks are unavailable

High throughput/QoS Connect via the access network with highest data rate and/or

shortest delay Broader bandwidth

Aggregate the bandwidth offered by multiple access networks Energy Conservation

Different power consumption properties of access networks provide chances for better energy efficiency.

Enhanced Security Transmitting sensitive data on multiple access networks

potentially provides higher security.

Access Selection: Research Challenges

Non-predetermined traffic flows start/terminate at discrete time points.

Access networks’ bandwidth and delay might fluctuate.

How to select appropriate access networks for application traffic flows?

QoS requirements Energy consumption User/application

specified access preferences

Dynamicity Multiple Constraints

Groupware apps

Multiparty collaborationsSegutiReliability + Security

Summary

New Generation of Pervasive and Mobile Computing Applications with diverse content Need significant enhancements in system and software support

Distributed mobile middleware can significantly improve performance of next generation mobile applications. Open interfaces will yield much more optimized solutions for distributed

mobile devices.

The use of cross-layer design architectures is inevitable for future mobile systems, if we are to realize cumulative benefits of independent research at each system layer.

Wireless Networking 103

Networks for Mobile Computing

Mobile Internet Mobile IP (MIP)

Introduction (goals, architecture, protocol, examples)

MIP messages, encapsulations MIP issues: triangular routing,

reverse tunneling, MobileIPv6

Micro-mobility Protocols Cellular IP HMIP MobileNAT

Summary

Mobile Ad Hoc Networks Introduction: difference from

Wireless Sensor Networks (WSNs)

Routing Protocols WRP AODV DSR Improvements:

• interference levels

• topology control/management

Summary

Wireless Networking 104

Motivation for Mobile IP

Internet routing based on IP destination address and network prefix change of physical subnet implies that the mobile node should

change its IP address to have a topologically correct address

Challenges – 1) find the MS, 2) avoid disconnection DNS? Updates take to long time Per-host routing? Too many entries in the RT.

Solution: Mobile IP is an open standard, defined by the Internet Engineering Task Force (IETF) RFC 2002,

that allows users to keep the same IP address, stay connected, and maintain ongoing applications while roaming between IP networks

Network supported Mobile IP (tunneling in IPv4)

Host supported Mobile IPv6 (Routing extension header)

Wireless Networking 105

Requirements to Mobile IP (RFC 3344)

Transparency Mobile keeps its IP address when changing subnets Communication continues after interruption of link possible

Compatibility no changes to current end-systems and routers required - tunneling no changes to fixed systems – HA-FA tunneling

Security authentication of all registration messages – MIP messages

Efficiency and scalability only a few additional messages to the mobile system required (connection typically via a

low bandwidth radio link) – MIP messaging Global support of a large number of mobile systems in the whole Internet – HA for MN

Wireless Networking 106

Architectural Components1. End system elements

Mobile Node (MN) Correspondent Node (CN): communication partner

2. Network elements Home Agent (HA): System in the home network of the MN, typically a router

Registers the location of the MN, tunnels IP datagrams to the COA Foreign Agent (FA): the default router for MN

Forwards the tunneled datagrams to the MN Can be collocated with MN

Care-of Address (COA): address of the current tunnel end-point for the MN

Can be associated with the MN or FA.

Wireless Networking 107

Mobile IP Protocol Agent Advertisement using ICMP

HA and FA periodically send advertisement messages into their physical subnets in ICMP messages

MN listens to these messages and detects, if it is in the home or a foreign network (standard case for home network)

MN reads a COA from the FA advertisement messages MN may send out router (agent) solicitation.

Registering the COA using UDP binding for the mobile node – tuple (home address, COA,

registration lifetime, authentication) binding update sent by MN to HA for remote redirect.

Traffic forwarding using Tunneling HA advertises the IP address of the MN (as for fixed

systems) via proxy ARP routers adjust their entries, these are stable for a longer

time (HA responsible for a MN over a longer period of time)

packets to the MN are sent to the HA, which tunnels to the COA.

independent of changes in COA/FA

Wireless Networking 108

Example network

mobile end-systemInternet

router

router

router

end-system

FA

HA

MN

home network

foreign network

(physical home networkfor the MN)

(current physical network for the MN)

CN

Wireless Networking 109

Data transfer to the mobile system

Internet

sender

FA

HA

MN

home network

foreignnetwork

receiver

1

2

3

1. Sender sends to the IP address of MN, HA intercepts packet (via proxy ARP)2. HA tunnels packet to COA, here FA,

by encapsulation3. FA forwards the packet to the MN

CN

Wireless Networking 110

Data transfer from the mobile system

Internet

receiver

FA

HA

MN

home network

foreignnetwork

sender

1

1. Sender sends to the IP address of the receiver as usual,

FA works as default routerCN

Wireless Networking 111

Agenda

Mobile Internet Mobile IP (MIP)

Introduction (goals, architecture, protocol, examples)

MIP messages, encapsulations MIP operations: triangular

routing, reverse tunneling, MobileIPv6

Micro-mobility Protocols Cellular IP HMIP MobileNAT

Summary

Mobile Ad Hoc Networks Introduction: difference from

Wireless Sensor Networks (WSNs)

Routing Protocols WRP AODV DSR Improvements:

• interference levels

• topology control/management

Summary

Wireless Networking 112

Mobile Ad-hoc Networks (MANET)

Ad-hoc network: A collection of wireless mobile hosts forming a

temporary network without the aid of any established infrastructure or centralized administration.

Significant differences to existing wired networks: Wireless Self-starting No administrator Cannot assume, that every computer is within

communication range of every other computer Possibly quite dynamic topology of interconnections

Traffic types: unicast/multicast/anycast/geocast

Wireless Networking 113

Routing in MANET

Routing assumptions for unicast traffic Flat topology assumption

Proactive: DSDV, TORA, WRPReactive: AODV, DSR, STAR

Hierarchical topology assumptionClustering: CBRP, PATM

Geographic assumptionLocation aided routing: LAR, GeoCast

Wireless Networking 114

Classification of Routing Protocols for MANETS

Unicast-Routing Protocol for MANET (Topology-based)

Table-Driven/Proactive

Hybrid On-Demand /Reactive

Clusterbased/Hierarchical

DistanceVector

Link-State

ZRP DSRAODVTORA

LANMARCEDAR

DSDV OLSRTBRPF

FSRSTAR

MANET: Mobile Ad hoc Network

(IETF working group)

Wireless Networking 115

Desired Properties of Ad Hoc Routing Protocols

Distributed Bandwidth efficient

Reduce control traffic/overhead Battery efficient Fast route convergence Correct: loop free

Reduce overhead Unidirectional Link Support

Wireless Networking 116

Performance Metrics of Ad Hoc Routing Protocols

Maximize end-to-end throughput delivery ratio load balancing (congestion)

Minimize end-to-end delay packet loss shortest path/minimum hop (route length) overhead (bandwidth) energy consumption

Wireless Networking 117

Mobile Ad hoc Networks (MANET) vs. Sensor Networks

MANET SensorNet

applications meeting, grp collaboration smart building, habitat monitoring

comm. address-centric comm. data centric comm.

topology peer-to-peer sensors base & peer-to-peer

traffic random periodic, synchronous

platform laptops, PDAs motes: more resource constrained

scale 10’s >1000: larger scale and more redundancy

mobility slow (meeting) ~ fast (cars): focus on mobility

slow (habitat) ~ fast: less focus on mobility so far

similarity No infrastructure, multi-hop, wireless networks

Wireless Networking 118

Address Centric Routing (AC)Temperature Reading

(source 2)Temperature Reading(source 1)

Give Me The Average Temperature?( sink )

source 1

source 1

source 2

source 2

source 2

B

Z

Wireless Networking 119

Data Centric Routing (DC)Temperature Reading

(source 2)Temperature Reading(source 1)

Give Me The Average Temperature?( sink )

source 1

source 2

source 2

source 1 & 2

B

Z

Wireless Networking 120

Distance-Vector routing

Each node maintains a routing table containing list of all available destinations number distance to each each destination next hop to reach a destination

The succession of next hops leads to a destination Each node periodically broadcasts its current estimate of

the shortest distance to each available destination to all of its neighbors

Typical representative: Distributed Bellman-Ford (DBF)

Wireless Networking 121

AODV (Ad Hoc On-Demand Distance Vector)

AODV is based on the DSDV (Destination-Sequenced Distance Vector) algorithm Distance vector Sequence numbers controlled by the destination.

Creation of routes on a demand basis – traffic reactive Nodes that are not on a selected path do not maintain

routing information or participate in routing table exchanges!

Goal: Minimize broadcast overhead and transmission latency

Wireless Networking 122

Route Requests from S to D in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Wireless Networking 123

Route Requests from S to D in AODV

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

Wireless Networking 124

Route Requests from S to D in AODV

B

A

S E

F

H

J

D

C

G

IK

Represents links on Reverse Path

Z

Y

M

N

L

Wireless Networking 125

Reverse Path Setup from S to D in AODV

B

A

S E

F

H

J

D

C

G

IK

• Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

Z

Y

M

N

L

Wireless Networking 126

Reverse Path Setup from S to D in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Wireless Networking 127

Reverse Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y• Node D does not forward RREQ, because node D is the intended target of the RREQ

M

N

L

Wireless Networking 128

Route Reply from D to S in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents links on path taken by RREP

M

N

L

Wireless Networking 129

Route Reply in AODV

Intermediate node may also send a Route Reply (RREP) provided that it knows a more recent path than the one previously known to sender S To determine whether the path known to an intermediate

node is more recent, destination sequence numbers are used

The likelihood that an intermediate node will send a RREP not as high as DSR An intermediate node which knows a route, but with a

smaller sequence number, cannot send Route Reply

Wireless Networking 130

Forward Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Forward links are setup when RREP travels alongthe reverse path

Represents a link on the forward path

Wireless Networking 131

Data Delivery in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Routing table entries used to forward data packet.Route is not included in packet header.

DATA

Wireless Networking 132

AODV Key Advantages

“Partial” routing tables are constructed reactively Entries are updated only when a node sends to another unreachable

node No periodic updates Node not on active paths maintain no routing entries Reduce packet overhead

Routing table No source routing needed reduce bit overhead “Route caching” reduce establishment latency Sequence number loop freedom

Push link failure to relevant nodes Reduce establishment latency

Wireless Networking 133

Dynamic Source Routing (DSR) [Johnson96]

When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery using Route Request (RREQ)

Each node appends own identifier when forwarding RREQ

Wireless Networking 134

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Wireless Networking 135

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

[S]

[X,Y] Represents list of identifiers appended to RREQ

Wireless Networking 136

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

• Node H receives packet RREQ from two neighbors: potential for collision

Z

Y

M

N

L

[S,E]

[S,C]

Wireless Networking 137

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

• Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

Z

Y

M

N

L

[S,C,G]

[S,E,F]

Wireless Networking 138

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

• Nodes J and K both broadcast RREQ to node D• Caveat: Since nodes J and K are hidden from each other, their

transmissions may collide

N

L

[S,C,G,K]

[S,E,F,J]

Wireless Networking 139

Route Discovery in DSR

Destination D on receiving the first RREQ, sends a Route Reply (RREP) RREP is sent on a route obtained by reversing the

route appended to received RREQ RREP includes the route from S to D on which

RREQ was received by node D

Wireless Networking 140

Route Reply in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

RREP [S,E,F,J,D]

Represents RREP control message

Wireless Networking 141

Dynamic Source Routing (DSR)

Node S on receiving RREP, caches the route included in the RREP

When node S sends a data packet to D, the entire route is included in the packet header hence the name source routing

Intermediate nodes use the source route included in a packet to determine to whom a packet should be forwarded

Wireless Networking 142

Data Delivery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

DATA [S,E,F,J,D]

Packet header size grows with route length

Wireless Networking 143

DSR Optimization: Route Caching

Each node caches a new route it learns by any means Through Route Request (RREQ)

When node K receives RREQ [S,C,G] destined for node D, node K learns route [K,G,C,S] to node S

Through Route Reply (RREP) When node S finds RREP [S,E,F,J,D] to node D, node S also learns route [S,E,F] to

node F When node F forwards RREP [S,E,F,J,D], node F learns route [F,J,D] to node D

Through DATA packet’s source routes When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D A node may also learn a route when it overhears Data

Problem: Stale caches may increase overheads

Wireless Networking 144

Dynamic Source Routing: Advantages

Routes maintained only between nodes who need to communicate reduces overhead of route table maintenance

Routing cache can further reduce route discovery overhead

A single route discovery may yield many routes to the destination, due to intermediate nodes replying from local caches

Wireless Networking 145

Dynamic Source Routing: Disadvantages

Packet header size grows with route length due to source routing

Flooding of route requests may potentially reach all nodes in the network

Stale caches will lead to increased overhead Common problems for both AODV and DSR

Potential collisions between route requests propagated by neighboring nodes - insertion of random delays before forwarding RREQ

Increased contention if too many route replies come back due to nodes replying using their local cache - Route Reply Storm problem