Title: CSE 535 Mobile Computing Lecture 6: Adaptive App.
1CSE 535 Mobile ComputingLecture 6 Adaptive
App.
- Sandeep K. S. Gupta
- School of Computing and Informatics
- Arizona State University
Based on Slides by Prof. Richard, UNO
2Adaptation
3Adaptation
- Mobile applications must adapt to changing
resource levels to provide an acceptable
computing experience to users - Can
- Adapt functionality
- Adapt data
4Functional Adaptation
- Change the way the application operates as
resources change - Use cached copies of data instead of making
remote procedure calls against a server - Render low resolution images rather than relying
on an (unreachable) rendering farm
5Data Adaptation
- Change the quality or timeliness of data streams
- Higher or lower resolution video
- Change bitrate of streaming audio
- Use out-of-date temperature or stock market data
rather than current values when disconnected
6Adaptation
Odyssey is one point on this spectrum
none
full
level of application adaptability
application entirely responsible for
reacting (or not) to changing conditions
system entirely responsible for reacting (or not)
to changing conditions protects application
7Application-Aware Adaptation
- In most cases, adaptation is application-specific
- e.g., if network bandwidth becomes scarce, need
to do different things for applications dealing
with - Video
- Audio
- Still images
- Stock quotes
- individual applications (data type etc.)
8Application-Aware (2)
- Applications are in better position to perform
needed adaptations - In client/server scenarios, may need to adapt at
both the client and server ends - Possible approaches
- Purely internal to application
- Layer under application
- Using special OS features and/or libraries
- Use application-specific (but general purpose?)
proxies - Web browsers can use last approach
- Can have any sort of adaptation as long as an
appropriate proxy exists
9"Agile Application-Aware "
- Paper
- "Agile Application-Aware Adaptation for Mobility"
- Seehttp//www.cs.uno.edu/golden/6990MC/MobilePa
pers/satya3.ps - Describes the Odyssey system
- Prototype that allows mobile applications to
adapt to changing conditions - Network bandwidth
- Battery / CPU power, etc.
10"Fidelity"
- Mobile clients may access a number of data stores
- Databases
- WWW
- Files
- Ideally, want data accessed by mobile host to be
identical to "reference" copy - Might be unrealistic
- Fidelity measures degree to which copies match
11"Fidelity" (2)
- Odyssey provides a framework for developing
diverse fidelity guarantees - Largely depends on type of data
- Video
- Color depth, resolution, frames per second
- Audio
- of bits per sample, encoding scheme
- Web data
- Age latest copy of page vs. a slightly older one
- Generally, must also depend on application
- Different applications may choose different
tradeoffs
12"Concurrency"
- Palm pilots typically execute only one
application at a time - Likely that users of more powerful mobile
computers (IPAQs, laptops) will want to run
multiple applications - Background monitoring applications
- Means OS must manage network resources, battery
power, cache space, - All resources are not just for you!
13"Agility"
- System should react quickly and accurately to
changes in availability of resources - Changes may result because of a physical reason
- Battery is draining
- Network access is curtailed because of
interference - or because of increased application demands
- Additional applications are now running
14Odyssey Goals
- Allow application-aware adaptation
- Each application will decide how to adapt to
changing conditions - Can register its interest in various resource
levels - System informs applications when resource levels
deviate from certain tolerances - Support application diversity and concurrency
- Applications decide how resource level map to
fidelity levels - Odyssey controls resource monitoring
- Application can either adapt functionality or
data quality - Odyssey examples concentrate on data adaptation
15Application Aware Adaptation
- Wardens support type-awareness
- Supporting a new type involves writing a warden
- Viceroy is responsible for centralized resource
management
video warden
viceroy
application
battery warden
16Application Aware Adaptation (2)
- Applications access resources through Odyssey
- All data to and from server flows through Odyssey
- Wardens communicate with data servers, handle
caching - Applications never contact wardens directly
- request() system call allows applications to
express windows of tolerance - Viceroy uses an upcall callback to notify
application that resource level has strayed - Application then adjust expectations, does
another request()
17Adaptation Example
- Video application requests enough bandwidth to
receive high resolution,15fps in color - Odyssey says Umm, no.
- Application drops requirements to low resolution,
10fps in black and white - Specifies both min and max bandwidth
- Scenario 1
- Bandwidth drops
- Odyssey informs application that bandwidth has
fallen below specified limit - Application makes another request (e.g., 3fps or
still images) or decides video isnt feasible and
informs the user
18Adaptation Example (2)
- Scenario 2
- Bandwidth increases substantially
- Odyssey informs application that bandwidth has
risen above upper limit - Application makes another attempt 15fps color
19Odyssey Architecture (from paper)
20"Fidelity"
- Mobile clients may access a number of data stores
- Databases
- WWW
- Files
- Ideally, want data accessed by mobile host to be
identical to "reference" copy - Might be unrealistic
- Fidelity measures degree to which copies match
21Sample Applications (1)
- Video Player Xanim
- For evaluation, split into client/server
- Store three formats at server high quality, low
quality, black and white - Not too much magic application calculates
bandwidth requirement - Registers requirement,asks for a change
informat if bandwidthchanges
22Sample Applications (2)
- Netscape
- More challenging, source code is not available
- Solution uses Netscape proxy facility
- Proxy interfaces with Odyssey and selects
fidelity - Web warden chooses image quality
- Multiple image formats stored on a server
Handles different image formats
23Odyssey Evaluation
- Experiments help determine
- How agile is Odyssey in the face of changing
network bandwidth? - How beneficial is it for (some) applications to
exploit the adaptation that Odyssey offers? - Bandwidth is controlled by modifying network stack
24"Waveforms"
Increase in bandwidth
Decrease in bandwidth
Brief, sharp increase in bandwidth Brief, sharp
decrease in bandwidth
25Agility Measurements (1)
26Agility Measurements (2)
27Agility Measurements (3)
28Agility Measurements (4)
29Evaluation of Adaptation (1)
- How much does it help?
- Table below summarizes for video player
- Bandwidth is always sufficient for B/W frames
- Interested in lowest drop rates _at_ highest fidelity
static strategies
(Numbers in parentheses are standard deviations)
30Evaluation of Adaptation (2)
- Table below summarizes for web browser
- Experiment repeatedly retrieves the same image
until time is up - Interested in best fidelity within twice
Ethernet's load time
fooled
static strategies
(Numbers in parentheses are standard deviations)
31More on Adaptation
- Odyssey allows applications to register interest
in resource levels and adapt accordingly - For multitasking operating systems, need more
- When multiple applications compete for resources
- Need prioritization of applications
- Prioritization will likely require interaction w/
user - Middleware might learn whats important?
- Adaptation interface should allow applications to
know about existence of other competing
applications
32Final Word on Adaptation
- Although proxies can be used, Odyssey really
aimed at systems for which source code is
available - Other systems geared toward applications which
cant easily be modified - e.g., Puppeteer targets applications which
provide a data manipulation API - (That is, some way to feed data to an
application programmatically)
33Final Picture on Adaptation