01.12.2014 Views

5. Adaptation - Faculty of Computer Science - Technische ...

5. Adaptation - Faculty of Computer Science - Technische ...

5. Adaptation - Faculty of Computer Science - Technische ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Department <strong>of</strong> <strong>Computer</strong> <strong>Science</strong> Institute for System Architecture, Chair for <strong>Computer</strong> Networks<br />

Application Development for Mobile<br />

and Ubiquitous Computing<br />

<strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

Dr. Ing. Thomas Springer<br />

<strong>Technische</strong> Universität Dresden<br />

Chair <strong>of</strong> <strong>Computer</strong> Networks


Lecture Overview<br />

• Definitions<br />

• Proxy Pattern<br />

• <strong>Adaptation</strong> <strong>of</strong> Communication<br />

• Content <strong>Adaptation</strong><br />

• <strong>Adaptation</strong> <strong>of</strong> Application Structure<br />

• Taxonomy <strong>of</strong> <strong>Adaptation</strong> Mechanisms<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

2


Definitions:<br />

• The term adaptation describes the adjustment <strong>of</strong> a<br />

system to specific conditions in its execution<br />

environment.<br />

• Adaptive application can be defined as application<br />

which provides a variable quality <strong>of</strong> service, senses<br />

the context <strong>of</strong> its execution environment, adjust to the<br />

current context and is able to dynamically react on<br />

changes <strong>of</strong> the context by adjusting its quality <strong>of</strong><br />

service at runtime<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

3


<strong>Adaptation</strong><br />

context information<br />

• What is adapted to what?<br />

object <strong>of</strong><br />

adaptation<br />

• Object <strong>of</strong> <strong>Adaptation</strong><br />

• application data<br />

• transfer <strong>of</strong> data<br />

• processing components (structure, placement)<br />

adaptation<br />

result<br />

target <strong>of</strong><br />

adaptation<br />

• Target <strong>of</strong> adaptation<br />

• available resources <strong>of</strong> execution environment (device,<br />

network, …)<br />

• user preferences, current situation<br />

• Context information represents information about target<br />

<strong>of</strong> adaptation<br />

‣ necessary pre-requisites for adaptation<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

4


PROXY PATTERN


Proxy Pattern<br />

• basic architectural s<strong>of</strong>tware pattern<br />

• abstraction layer (intermediary) between<br />

communication partners<br />

• indirect communiction via intermediary<br />

• goal:<br />

• introduction <strong>of</strong> additional funtionality<br />

• proxy as a representative (reachability, act on behalf <strong>of</strong><br />

component)<br />

• can be used to extend existing applications and systems<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

6


Proxy on the Client<br />

• enables extensions <strong>of</strong> client functionality<br />

• support <strong>of</strong> disconnected operations<br />

• proxy <strong>of</strong> server on the client (server emulation)<br />

• caching, prefetching<br />

• adaptation <strong>of</strong> communication from client to server<br />

• no data reduction for server-to-client communication<br />

• client not reachable during phases <strong>of</strong> disconnection<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

7


Proxy on an Infrastructure Host<br />

• represents client within the infrastructure<br />

• client reachable during disconnections<br />

• independent from certain server<br />

• data reduction for server-to-client communication<br />

• acts usually as generic proxy - generic adaptation support<br />

only<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

8


Proxy on Server<br />

• enables extensions <strong>of</strong> server functionality<br />

• data reduction for server-to-client communication<br />

• application specific adaptation functionality<br />

• data filtering<br />

• adaptation <strong>of</strong> multimedia content<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

9


Proxy on Client and Server<br />

• enables extensions on client and server for symmetric<br />

mechanisms<br />

• enhance communication protocols<br />

• error correction<br />

• encryption/decryption<br />

• encoding/decoding<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

10


ADAPTATION OF<br />

COMMUNICATION AND<br />

DATA TRANSFER


Rescheduling data access<br />

• Prefetching<br />

• Transmission operation before explicit access<br />

• Prediction <strong>of</strong> data access (e.g. from current user actions)<br />

• Short response times<br />

• High availability (during disconnections)<br />

• Exploiting unused network capacity<br />

• Waste <strong>of</strong> network capacity if prediction incorrect<br />

• Efficient prediction mechanisms necessary<br />

• Manual (user defined file list as used in Coda)<br />

• Automated (prefetching <strong>of</strong> web-pages based on links in<br />

currently visited page)<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

12


Prefetching and Caching<br />

prefetching<br />

read access<br />

t<br />

Client<br />

read<br />

Read/Write<br />

Cache<br />

read<br />

Server<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

13


Rescheduling data access<br />

• in opposite<br />

• Lazy evaluation and delayed write-back<br />

• Transmission operation after data access<br />

• Equal usage <strong>of</strong> network capacity, avoiding peaks<br />

• Lazy evaluation<br />

• use placeholders and delay data transmission<br />

• e.g. Display only visible part <strong>of</strong> web-pages, transmission <strong>of</strong><br />

further content is postponed<br />

• Queuing <strong>of</strong> RPC-Messages while facing insufficient network<br />

capacity<br />

• distribute network load<br />

• avoid unnecessary data transfer, decrease response time<br />

• Delayed write-back<br />

• Local changes to files only, write-back <strong>of</strong> files only if file is<br />

closed (Coda)<br />

• Log optimization<br />

• Save bandwidth, avoid unnecessary updates<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

14


Lazy Evaluation<br />

read<br />

delayed read<br />

t<br />

Client<br />

read<br />

(outline)<br />

data<br />

Proxy<br />

read (data)<br />

Server<br />

read<br />

outline<br />

delayed read<br />

data<br />

data<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

15


Delayed Write-back<br />

prefetching<br />

read<br />

write<br />

delayed write-back<br />

t<br />

Client<br />

read<br />

Read/Write<br />

Cache<br />

read<br />

Server<br />

write<br />

read<br />

write-back<br />

data<br />

write<br />

ok<br />

write<br />

ok<br />

write-back<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

16


Queuing (delayed message delivery)<br />

send message<br />

forward message<br />

t<br />

Client<br />

message<br />

Queue<br />

message<br />

Server<br />

send message<br />

ok<br />

forward message<br />

error<br />

forward message<br />

ok<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

17


DATA ADAPTATION


<strong>Adaptation</strong> <strong>of</strong> Application Data<br />

• Basically<br />

• dropping <strong>of</strong> data<br />

• replacement<br />

• transformation<br />

• Important: adaptation <strong>of</strong> multimedia content<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

19


Odyssey – Pre-adapted Data<br />

• remote data access for mobile devices<br />

• execution and control <strong>of</strong> concurrent applications<br />

• central resource management and monitoring (Viceroy)<br />

• data-type and application specific components<br />

(Wardens)<br />

Client<br />

resourceID<br />

manages and monitors<br />

tolerance window<br />

resources<br />

notification handle<br />

Noble, Satyanarayanan (Carnegie Mellon University)<br />

server<br />

Application<br />

register<br />

resource<br />

resource<br />

manager<br />

(Viceroy)<br />

warden1<br />

warden2<br />

warden3<br />

notify<br />

Interceptor<br />

several levels <strong>of</strong><br />

quality for data objects<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

20


Odyssey Example – Video Player<br />

video stream stored in<br />

different levels <strong>of</strong> quality<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

21


Pre-adapted Data - Odyssey<br />

• Simple approach for data adaptation at application level<br />

• provision <strong>of</strong> various quality levels for application data at server<br />

• client chooses quality level according to network capacity and<br />

device resources<br />

• dynamic changes between quality levels supported<br />

• System service maintains resources on mobile device<br />

• monitoring and control <strong>of</strong> resources (bandwidth, CPU cycles,<br />

battery power)<br />

• applications register during resource allocation with defined<br />

window <strong>of</strong> tolerance<br />

• system notifies registered application if resource availability<br />

leaves window <strong>of</strong> tolerance<br />

• no computing power consumed at runtime<br />

• high requirements for storage capacity limit number <strong>of</strong><br />

versions<br />

• limited flexibility for adaptation<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

22


Data Filtering<br />

• On-the-Fly adaptation <strong>of</strong> application data<br />

• Enables significant reduction <strong>of</strong> volume <strong>of</strong> data<br />

• Fine-grained control <strong>of</strong> data reduction possible<br />

• filter rules for data selection<br />

• Low consumtion <strong>of</strong> computation time and resources<br />

• no data processing but data selection and cancelation<br />

• Filtering possible at all levels <strong>of</strong> system architecture<br />

• application-transparent (e.g. filtering <strong>of</strong> TCP packets)<br />

• application-specific (e.g. filtering <strong>of</strong> web content)<br />

• more flexiblity compared to pre-adaptation<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

23


Proxy-based Filtering<br />

MH Proxy FH<br />

• Generic execution<br />

environment for application<br />

specific filters<br />

Proxy Server<br />

Filter Execution Environment<br />

• Proxy supports:<br />

• optimized protocols<br />

• data type dependent filters<br />

• data compression<br />

• Dynamic installation <strong>of</strong><br />

filters<br />

• High Level (MPEG, HTTP,<br />

SMTP)<br />

• Low Level (TCP, UDP)<br />

High Level Proxy<br />

Low Level Proxy<br />

Data flow from filter to<br />

network interface<br />

User Space<br />

Kernel<br />

Network<br />

Interface<br />

Ref: Zenel, Duchamp (Carnegie Mellon University)<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

24


On-the-Fly <strong>Adaptation</strong> <strong>of</strong> Media Data<br />

• Filtering supports only discarding <strong>of</strong> information<br />

• Reduction <strong>of</strong> multimedia data with minimal information<br />

loss required<br />

• Compression<br />

• combination <strong>of</strong> mechanisms for lossy and lossless<br />

compression<br />

• Preparation (e.g. create 8x8 pixel blocks for JPEG)<br />

• Processing (e.g. transformation from space to frequency<br />

using Discrete Cosinus Transformation)<br />

• Quantization: Reduce quality (accuracy) <strong>of</strong> information<br />

• Entropy encoding: lossless compression<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

25


<strong>Adaptation</strong> <strong>of</strong> Media Data<br />

• Compression reduces information content <strong>of</strong> data<br />

• Other properties remain unchanged (e.g. image size<br />

or colour depth)<br />

• Conversion<br />

• Changes further properties <strong>of</strong> media objects (e.g. color<br />

depth, sample rate, resolution, frame rate)<br />

• <strong>Adaptation</strong> <strong>of</strong> specific properties <strong>of</strong> certain media types<br />

• More fine-grained decisions for media adaptation<br />

dependent on device capabilities (e.g. display size or<br />

storage capacity) and connectivity<br />

• Changes <strong>of</strong> data formats overcomes lack <strong>of</strong> supported<br />

formats on mobile devices<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

26


On-the-fly <strong>Adaptation</strong> - Distiller<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

27


On-the-fly <strong>Adaptation</strong> - Distiller<br />

• HTTP-proxy residing at network host<br />

• Data-type specific compression within the network<br />

infrastructure<br />

• <strong>Adaptation</strong> at runtime to support heterogeneous mobile<br />

devices and varying network quality<br />

• Goal:<br />

• Reduction <strong>of</strong> end-to-end delay using distillation<br />

(distillation time has to be lower than time saved by data<br />

reduction)<br />

• Distillation: data-type specific data reduction while<br />

keeping data semantics<br />

• Refinement: request and presentation <strong>of</strong> partially data<br />

with higher quality (e.g. detail <strong>of</strong> a picture)<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

28


Distiller – <strong>Adaptation</strong> Mechanisms<br />

• Images<br />

• Lossy compression<br />

• Refinement <strong>of</strong> picture details<br />

• Model to predict processing time and compression rate<br />

o user defines maximum <strong>of</strong> required end-to-end delay<br />

o available bandwidth and display size involved in calculation<br />

o calculation <strong>of</strong> parameters for distillation based on max.<br />

delay time<br />

- color depth, resolution, factor for compression<br />

• Postscript documents<br />

• conversion to HTML and RTF<br />

• 5 to 7 times lower amount <strong>of</strong> data<br />

• supports devices with lack <strong>of</strong> postscript support<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

29


<strong>Adaptation</strong> <strong>of</strong> Structured Data<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

30


COMBINATION OF<br />

ADAPTATION<br />

MECHANISMS


Pipes and Filters Pattern<br />

• Architectural pattern<br />

• Goal: flexible configuration and reconfiguration <strong>of</strong> processing<br />

• processing <strong>of</strong> a system decomposed into autonomous steps<br />

encapsulated in filters<br />

• Loose coupling <strong>of</strong> filters - flexible selection <strong>of</strong> sequence <strong>of</strong><br />

filters<br />

• Increases reusability<br />

• System consists <strong>of</strong>:<br />

• data source, chain <strong>of</strong> filters, data sink<br />

• filter contains typed interfaces for reading and writing data<br />

• pipes for interconnection <strong>of</strong> filters with interfaces <strong>of</strong> compatible<br />

types<br />

• push or pull exchange <strong>of</strong> data<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

32


Protocol Boosters<br />

• Combination <strong>of</strong> adaptation mechanisms for communication<br />

protocols<br />

• Booster<br />

• hardware or s<strong>of</strong>tware module transparently injected into<br />

protocol processing<br />

• operate on particular base-protocol (e.g. TCP or UDP)<br />

• no change <strong>of</strong> base-protocol (transparent injection)<br />

• one booster: cummulation <strong>of</strong> TCP ACK, creation <strong>of</strong> duplicated<br />

ACK for TCP, implementation <strong>of</strong> Snoop protocol<br />

• pair <strong>of</strong> boosters: Forward error correction mechanism,<br />

encryption, compression<br />

Messages <strong>of</strong> Base-Protocol<br />

Sender<br />

Booster<br />

Booster<br />

Receiver<br />

Messages <strong>of</strong> Boosters<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

33


Ninja Path<br />

• Creation <strong>of</strong> complex services out <strong>of</strong> simple services<br />

• Notion <strong>of</strong> paths<br />

• sequence <strong>of</strong> operators and connectors<br />

• operators: stream-based in- and output, transformation<br />

<strong>of</strong> data<br />

• connectors: streaming protocols, transportation <strong>of</strong> data<br />

(TCP or UDP)<br />

• Infrastructure consists <strong>of</strong><br />

• workstation clusters<br />

• Mobile devices<br />

• Active proxies associated to particular mobile devices<br />

• Goal: create optimized sequence <strong>of</strong> operators for data<br />

transformation<br />

• operators are running or are instanciated on node <strong>of</strong><br />

infrastructure<br />

• selection <strong>of</strong> appropriate transformation operations<br />

• optimized placement <strong>of</strong> operators<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

34


Ninja Infrastructure<br />

cluster <strong>of</strong><br />

workstations with fast<br />

network connection<br />

Path<br />

Subsystem<br />

adapting data and access<br />

protocols according to unit<br />

capability<br />

Unit<br />

Active<br />

Proxy<br />

Unit<br />

Base<br />

Internet<br />

Active<br />

Proxy<br />

Unit<br />

Unit<br />

Base<br />

Ref: Katz, Fox, Brewer, ... (University <strong>of</strong> California at Berkeley)<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

35


Ninja Path<br />

• Three step path creation:<br />

1. Creation <strong>of</strong> logical path<br />

source and target operators are given<br />

search for intermediary operators fitting into the chain<br />

(based on input and output data types)<br />

XML-based description <strong>of</strong> operators (input and output type,<br />

semantics)<br />

shortest path algorithm used<br />

inclusion <strong>of</strong> connectors<br />

2. Transformation to physical path<br />

search for running instances <strong>of</strong> the operator types<br />

load balancing, if multiple instances found<br />

determines also placement <strong>of</strong> instances<br />

newly created instances can be placed dynamically<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

36


Ninja Path (cont.)<br />

• three step path creation:<br />

3. Instantiation and Running<br />

path is assigned with unique id<br />

threads started for each operator<br />

link to operator for error handling<br />

• Source operator can start sending data<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

37


SYSTEMATIZATION


Systematization<br />

• Laissez-faire<br />

• No system support for adaptation<br />

• Applications have to explicitly implement adaptation functionality<br />

• Application controls resource allocation and adaptation<br />

• No optimization <strong>of</strong> resource allocation and adaptation for<br />

concurrent applications<br />

• Application-transparent<br />

• No application changes necessary<br />

• Centralized adaptation control and resource allocation by system<br />

for concurrent applications<br />

• No application level information usable for adaptation<br />

• No application specific adaptation functionality<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

39


Systematization<br />

• Application-aware adaptation<br />

• between both extrems<br />

• Co-operation between system and application<br />

• Combination <strong>of</strong> advantages<br />

o application specific adaptation operations<br />

o application-level information for adaptation control<br />

o central coordination <strong>of</strong> resource allocation and adaptation<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

40


Placement <strong>of</strong> Mechanisms<br />

• level <strong>of</strong> adaptation (generic, application-specific)<br />

• placement <strong>of</strong> mechanisms<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

41


E-Mail Application<br />

mobile computer<br />

wired network<br />

mail<br />

program<br />

user agent<br />

e-mail<br />

agent<br />

mail<br />

server<br />

generic proxy<br />

conventional application agent communication between components<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

42


Message Transfer<br />

application<br />

specific<br />

adaptation<br />

generic<br />

adaptation<br />

application<br />

specific<br />

adaptation<br />

MIME<br />

Image<br />

Head<br />

Text<br />

Audio<br />

restore<br />

Image<br />

Head<br />

Text<br />

Audio<br />

compression/<br />

conversion<br />

Image<br />

Head<br />

Text<br />

Audio<br />

filter<br />

Head<br />

Text<br />

Image Video Audio<br />

MIME<br />

email<br />

email<br />

email<br />

email<br />

user agent<br />

generic<br />

proxy<br />

email<br />

agent<br />

Client<br />

Mail Server<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

43


A General Partitioning Model<br />

mobile device<br />

wired network<br />

client<br />

application<br />

application<br />

related<br />

component<br />

application<br />

related<br />

component<br />

subcomponent<br />

subcomponent<br />

server 1<br />

server 2<br />

subcomponent<br />

generic<br />

component<br />

generic<br />

component<br />

application<br />

related<br />

component<br />

application<br />

related<br />

component<br />

server n<br />

direct communication<br />

indirect communication<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

44


TAXONOMY OF BASIC<br />

ADAPTATION<br />

MECHANISMS


• Caching<br />

• Prefetching<br />

• Filtering<br />

• Conversion and compression <strong>of</strong> data<br />

Examples <strong>of</strong> Basic <strong>Adaptation</strong><br />

Mechanisms<br />

<strong>Adaptation</strong> by Parametrization<br />

range <strong>of</strong> values (e.g. bandwidth)<br />

Adaption by Structural Changes<br />

range <strong>of</strong> values (e.g. error rate)<br />

Mechanismus works over<br />

the whole range<br />

several mechanisms work<br />

within sub-ranges<br />

changes <strong>of</strong> resource<br />

availability over sub-ranges<br />

requires changes in<br />

application structure<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

46


Taxonomy <strong>of</strong><br />

<strong>Adaptation</strong> Mechanisms<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

47


<strong>Adaptation</strong> <strong>of</strong> Application structure Data<br />

adaptation<br />

adaptation<br />

mechanisms<br />

communication<br />

parametrization<br />

application data<br />

• atomic (e.g. image, logic: input field and label)<br />

• tightly coupled (one file)<br />

• implicit structure (text within a file)<br />

• explicit structure (mime message)<br />

• loosely coupled (multiple files)<br />

• internal links (web content)<br />

• explicit structure description<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

48


<strong>Adaptation</strong> <strong>of</strong> application structure adaptation data<br />

adaptation<br />

mechanisms<br />

communication<br />

application data<br />

expansion<br />

transformation<br />

replacement<br />

aggregation<br />

annotation<br />

structure<br />

format<br />

coding<br />

generation from original data<br />

extraction (implicit data)<br />

selection (explicit alternatives)<br />

parametrization<br />

application data<br />

reduction<br />

lossy conversion<br />

filtering<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

49


<strong>Adaptation</strong> <strong>of</strong> application structure adaptation data<br />

adaptation<br />

mechanisms<br />

communikation<br />

parametrization<br />

communication<br />

transmission<br />

temporal storage<br />

access<br />

protocol parameters<br />

error handling<br />

prioritized data transfer<br />

queuing<br />

logging<br />

caching<br />

prefetching<br />

lazy evaluation<br />

delayed write-back<br />

application data<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

50


<strong>Adaptation</strong> <strong>of</strong> application structure adaptation data<br />

adaptation<br />

mechanisms<br />

communikation<br />

parametrization<br />

application data<br />

structure<br />

adaptation<br />

placement<br />

connections<br />

components<br />

migration<br />

creation<br />

dynamic binding<br />

indirection/proxy<br />

branching<br />

parallelization<br />

fusion<br />

adding<br />

replacing<br />

replication<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

51


Mechanisms for reducing and replacing<br />

data<br />

Mechanisms Effect Example Placement Number <strong>of</strong><br />

Components<br />

Filtering<br />

Conversion<br />

Generation<br />

Extraction<br />

Selection<br />

Reduces amount <strong>of</strong> data and<br />

information, cancelation <strong>of</strong><br />

not supported data types<br />

and formats<br />

Reduces amount <strong>of</strong> data and<br />

information, adapts data<br />

content (data type specific)<br />

Creates alternative data with<br />

same or reduced level <strong>of</strong><br />

information, can change type<br />

<strong>of</strong> data<br />

Extracts alternative data, can<br />

change type <strong>of</strong> data<br />

Selects one out <strong>of</strong> several<br />

alternative representations<br />

Attachments <strong>of</strong> an email,<br />

linked content <strong>of</strong> a web<br />

page (e.g. video data)<br />

Scaling <strong>of</strong> images,<br />

reduce framerate <strong>of</strong> video,<br />

sample rate <strong>of</strong> audio<br />

Speech to Text,<br />

generate vector representation<br />

from bitplane image<br />

Frame from image size,<br />

file name <strong>of</strong> deleted<br />

attachement<br />

Multiple versions <strong>of</strong> video<br />

ALT tag in HTML for<br />

image text description<br />

Proxy or Server,<br />

(before<br />

transmission)<br />

Proxy or Server,<br />

(before<br />

transmission)<br />

Proxy or Server<br />

Proxy or Server<br />

Proxy or Server<br />

One<br />

One<br />

One<br />

One<br />

One<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

52


Mechanisms for transforming and<br />

enriching data<br />

Mechanisms Effect Example Placement Number <strong>of</strong><br />

Components<br />

Transformation<br />

<strong>of</strong> coding<br />

Transformation<br />

<strong>of</strong> format<br />

Transformation<br />

<strong>of</strong> structure<br />

Changes coding <strong>of</strong> data,<br />

reduces amount <strong>of</strong> data<br />

(compression)<br />

Change coding in GIF,<br />

ASCII to UNI code,<br />

Huffman coding for<br />

compression<br />

Mobile Device<br />

and Proxy or<br />

Server<br />

Changes format <strong>of</strong> data GIF to JPEG Mobile Device<br />

and Proxy or<br />

Server<br />

Changes structure <strong>of</strong> data<br />

De/re-composition <strong>of</strong> email<br />

messages<br />

Web Pages (DOM – XML)<br />

Mobile Device<br />

and Proxy or<br />

Server<br />

Ttwo<br />

Two<br />

Two<br />

Aggregation<br />

Increases information content,<br />

summarizes information (data<br />

reduction)<br />

Integration <strong>of</strong> search<br />

results<br />

Proxy or Server,<br />

(before<br />

transmission)<br />

One<br />

Annotation<br />

Increases information content,<br />

increases amount <strong>of</strong> data with<br />

meta-information<br />

Tagging <strong>of</strong> telephone<br />

numbers or addresses in<br />

Web pages<br />

Proxy or Server,<br />

maybe mobile<br />

device<br />

One<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

53


Adapting access time and temporal storage<br />

Mechanisms Effect Example Placement Number <strong>of</strong><br />

Components<br />

Delayed writeback<br />

Delayed<br />

evaluation<br />

Prefetching<br />

Caching<br />

Logging<br />

Queuing<br />

Decreases amount <strong>of</strong><br />

data/messages, distributes<br />

network load over time,<br />

increases conflict probability<br />

Reduces amount <strong>of</strong> data to be<br />

transferred<br />

Reduces response time,<br />

increased availability, waste <strong>of</strong><br />

bandwidth<br />

Reduces response time and<br />

amount <strong>of</strong> data, increased<br />

availability<br />

Increase autonomy, increases<br />

response time<br />

Increase autonomy, increases<br />

response time, temporal storage<br />

Coda (disconnected<br />

operation),<br />

Read/Write Caches<br />

Outlines for Web content<br />

Web content, files, data<br />

Coda (disconnected op.),<br />

Web Caches<br />

locally performed<br />

operations (disconnected<br />

operation)<br />

Queued-RPC, Message<br />

oriented Middleware<br />

Mobile Device and<br />

Proxy or Server<br />

Mobile Device and<br />

Proxy or Server<br />

Mobile Device or<br />

Server<br />

Mobile Device or<br />

Proxy<br />

Mobile Device<br />

Mobile Device and<br />

Server<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

54<br />

One<br />

One<br />

One<br />

One<br />

One<br />

One


Mechanisms for transforming and<br />

enriching data<br />

Mechanisms Effect Example Placement Number <strong>of</strong><br />

Components<br />

Adjusting<br />

protocol<br />

parameters<br />

Improved bandwidth use,<br />

reduced response times,<br />

avoids overload<br />

Timeouts, window size,<br />

packet size, reduced<br />

packet headers<br />

Communication<br />

Partners<br />

two<br />

Forward error<br />

correction<br />

Error<br />

correction<br />

ARQ<br />

No response channel<br />

required, no retransmissions<br />

Performs retransmissions,<br />

no redundancy<br />

In combination to<br />

optimize balance<br />

between redundancy<br />

and resending (delay)<br />

Communication<br />

Partners<br />

Communication<br />

Partners<br />

two<br />

two<br />

Prioritizing <strong>of</strong><br />

data<br />

Multiple service classes,<br />

opitmized link usage<br />

Prioritizing <strong>of</strong> web<br />

content, messages <strong>of</strong><br />

different applications<br />

Sender (and<br />

Receiver)<br />

one (two)<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

55


Summary<br />

• Large variety <strong>of</strong> adaptation mechanisms available<br />

• data adaptation<br />

• communication<br />

• application structure<br />

• Mechanisms can be combined<br />

• Coordination <strong>of</strong> adaptation processes necessary<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

56


References<br />

• Vermeulen, A., Beged-Dov, G., Thompson, P.: The Pipeline<br />

Design Pattern. Workshop on Design Patterns for Concurrent,<br />

Parallel and Distributed Object-Oriented Systems OOPSLA 9<strong>5.</strong><br />

199<strong>5.</strong><br />

• Gamma, E., Helm, R., Johnson, R. E.: Design Patterns.<br />

Elements <strong>of</strong> Reusable Object-Oriented S<strong>of</strong>tware.<br />

Addison-Wesley, ISBN-13: 978-0201633610, 199<strong>5.</strong><br />

• Watson, T.: Effective wireless communication through<br />

application partitioning. Proceedings <strong>of</strong> the Fifth Workshop on<br />

Hot Topics in Operating Systems (HotOS-V), S. 24-27, 199<strong>5.</strong><br />

• Noble, B. D., Satyanarayanan, M, Narayanan, D., Tilton, J.<br />

E., Flinn, J., Walker, K. R.: Agile Application-Aware<br />

<strong>Adaptation</strong> for Mobility. In: proceedings <strong>of</strong> the 16 ACM<br />

Symposium on Operating System Principles, 1997.<br />

• Zenel, B.: A General Purpose Proxy Filtering Mechanism<br />

Applied to the Mobile Environment. In: Proc. <strong>of</strong> the 3th<br />

ACM/IEEE International Conference on Mobile Computing and<br />

Networking (MobiCom’97), S. 248–259, 1999.<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

57


References<br />

• Gribble, S. D., Welsh, M., von Behren, R., Brewer, E. A.,<br />

Culler, D., Borisov, N., Czerwinski, S., Gummadi, R., Hill, J.,<br />

Josheph, A., Katz, R.H., Mao, Z. M., Ross, S., Zhao, B.: The<br />

Ninja Architecture for Robust Internet-Scale Systems and<br />

Services. Special Issue on Pervasive Computing, Vol. 35, No.<br />

4, 2001.<br />

• Fox, A., Gribble, S. D., Chawathe, Y., Brewer, E. A.: Adapting<br />

to Network and Client Variation Using Active Proxies: Lessons<br />

and Perspectives. In: IEEE Personal Communications, Vol. ,<br />

No. 8, S. 10–19, 1998.<br />

• Marcus, W. S., Hadzic, I., McAuley, A. J., Smith, J. M.:<br />

Protocol Boosters: Applying Programmability to Network<br />

Infrastructures. IEEE Communications Magazine Vol. 36, No.<br />

10, S. 79-83. 1998.<br />

• Springer, T.: Ein komponentenbasiertes Meta-Modell<br />

kontextabhängiger Adaptionsgraphen für mobile und<br />

ubiquitäre Anwendungen; Dissertation, TU Dresden, 2004<br />

Dr. Thomas Springer Application Development - <strong>5.</strong> <strong>Adaptation</strong> Concepts<br />

58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!