2016 lecture3 mobile computing models

Upload: rohan-pansare

Post on 07-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    1/51

    Mobile and Pervasive Computing

    CNT5517 - Section 1G92CIS4930 - Section 1376

    Lecture 3

    Mobile Computing Models

    Dr. Sumi HelalComputer & Information Science & Engineering

    Department

    niversit! of "lorida# $ainesville# "L 3%''

    (elal)cise.u*.edu

    © 2016 Dr. Sumi Hell ! "o#ile n$ %er&'i&e Com(utin)

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    2/51

    +utline

    • Client/Server Computing Model

    • Mobile Computing Models

     – Unaware Client/Server Model

     – Client/Proxy/Server Model

     – Thin Client/Server Model – Disonneted !peration

     – Mobile "gents

     – !pportunisti Computing Model

     – #roadast Des$s

     – Cloud%Mobile & Cyber 'oraging Models

    • Cast Studies(

     – Coda

     – !dyssey

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    3/51

    )

    *eview( Client/Server Computing

    Request

    Reply

    Cache Coherency: - cache invalidation

     - update propagation

    clientcache

    Client

    Server

    Client

    State

    TLI

    RPC

    Sockets

    RESTful

    Fixed Network 

    server 

    cache

    TLI

    RPC

    Sockets

    RESTful

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    4/51

    +

    Client/Server Design

    • Stateless/state,ull lient/server design

    • Cahing and ahe invalidation

     –server invalidates lient ahe and/or  – lient re-uests server to validate its ahe.

     – ,ile system ahing( writes 0 update propagation

    • Connetionless/Connetion%oriented design

    • 1nter,aes 2TCP/1P3 *PC3 *4ST,ul3 et.5• !ther issues( multi%threading & deadlo$s

    *eview( Client/Server Computing

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    5/51

    6

    'ixed 7etwor$ Client/Server

     "ssumptions

    • Client Connetivity – lient is always onneted with availability

    omparable to the server8s. Server an always

    invalidate the lient ahe• Server "vailability & *eliability

     – server is highly available. *eliable i, stateless 2butstate in,o is exhanged in every C/S interation53 or

    i, implements reovery proedures 2may re-uirelient availability5

    • 7etwor$ *eliability – ,ast93 reliable93 #4* : ;

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    6/51

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    7/51

    A

    The Unaware Client/Server Model

    • 'ull lient on mobile host and ,ull server on,ixed networ$ 2SB1P/PPP C/S5

    • Client and Server are not mobility%aware

    • Client ahing does not wor$ as the lient anbe disonneted when the server invalidatesthe ahe

    • 7ot reliable and o, unpreditable per,ormane

    • Requires special cache invalidation algorithmsto enable caching despite long clientdisconnections

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    8/51

    The Client/Proxy/Server Model

    •  "dding mobility%awareness between the lient and theserver. Client and server are not mobility%aware.

    • Proxy ,untions as a lient to the ,ixed networ$ server3

    and as a mobility%aware server to the mobile lient• Proxy may be plaed in the mobile host 2Coda8s

    enus53 or the ,ixed networ$3 or both 2Eeb4xpress5

    •  "ppliation%dependent

    • Proxy embodies $nowledge o, limitations o, the lientand the wireless networ$ and the trans,ormations andadaptations neessary to ahieve good per,ormane.

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    9/51

    F

    Thin Client/Server Model

    • Thin lient ,its in resoure poor mobile devies

    • *e-uires at least wea$ onnetion3 but

    generates bounded ommuniation tra,,i• 4xamples( C1T*1G Ein'rame and 1C" thin

    lientH 1n,oPad

    Keyboard and mouse events

    Display eventsServer 

    Thin

    Client

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    10/51

    Send keystroke k ,(in Client

    Manager

     ,(in Client

    Server

    2. Send Keystroke “k” to word

    3. rab t!e window as a bitmap

    ". #ake t!e di$$erence btw. bitmaps

    %. Compress & Send di$$erence to

    client

    '. #ype k

    (. )ecompress di$$erence

    *. +erlay t!e di$$erence

    Compressed di$$erence

    kk

    Ho- does ,C /or01

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    11/51

    Eireless T/C Challenges

    •  "tive Components

    • 1ntense 1nterations

    • Total Disonnetion

    ;;

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    12/51

    T/C BoaliIation Jradient

    MobileComputing

    Connected 

    WeaklyConnected

    Disconnected

    LocalizationLocalization

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    13/51

    BoaliIation Spae

    Applications Events

    Data

    Others

    Mouse KB Voice

    eplica !ragmentCache

    "ocali#ations

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    14/51

     "tive Components

    Display $or% seconds Display $or

    % seconds

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    15/51

    Jeneral "pproah

    • Detet reurring displays

    • 4xtrat ative

    omponents separately

    • Client simulates ative

    omponents loally

    • Trans,er only non%

    repeating parts o, the

    sreen

    Blinking Cursor

     Animated GIFs

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    16/51

    Boop Detetion

    Deterministi Boops

    Server #u,,er 

    Client #u,,er 

    &

    %

    &

    %

    &

    %%

    &"oop o$ % states

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    17/51

    Boop Detetion7on%Deterministi Boops

    Server #u,,er 

    Client #u,,er 

    &

    %

    '

    %

    &

    '

    %

    &

    (D)"oop o$ ' states

    '

    Display *mage +%

    Display *mage +&

    Display *mage +'

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    18/51

    State 4xplosion

    • More than two ative omponents

     – Di,,erent number o, states

     – Di,,erent ,re-uenies

     – Two K%state ative omponents annot be

    aptured in ,our states

     – Eith ) ative omponents3 a bu,,er o, 0;

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    19/51

    San Bine "lgorithm "$soy et al9

    • Detet ative omponents on eah

    bu,,ered image

    • Pass san lines %0 4nlosing retangles

    • ertial and horiIontal san lines an

    produe extra ative omponents or big

    enlosing retangles

    C. 20so! and 2. Helal# +ptimi4ing ,(in Clients for /ireless 2ctive5media 2pplications# Proceedings of t(e ,(ird IEEE /or0s(op on

    Mobile Computing S!stems and 2pplications 6/MCS27889# (eld inMontere C2 Dec :5; %888. df  

    http://www.icta.ufl.edu/projects/publications/wmcsa2000.pdfhttp://www.icta.ufl.edu/projects/publications/wmcsa2000.pdf

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    20/51

    Scan Lines

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    21/51

    Scan Lines

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    22/51

    Second Step Scan Lines

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    23/51

     "C 4xtration

    • 'or eah ative omponent

     – Searh bu,,er ,or the same enlosing

    retangles

     – Compare the bitmaps in the retangles todetet states

     – Use bu,,er timing in,ormation to extrat timing

    o, the ative omponent

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    24/51

     "tive Components

    • )K3;KF3KF3;

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    25/51

    Leyboard BoaliIation

    • BoaliIation begins only i, intense L#

    ativity is deteted 2L# #litI3 *amamourthy et al5

    • Then L# is ,ully loaliIed and periodiallysyned and re%assessed

    • The L# #litI test involves – hoosing L#%#litI Eindow 2how muh o, typing needs

    monitoring5 – the $ind o, $eys typed3 and

     – the speed o, the typing

    K6

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    26/51

    L#%#litI BoaliIation *e-uirements

    • The loaliIation system should implement

    as muh o, its ,untionality at the server 

    • Display o, loaliIed typing must resemble

    the orresponding display when typing is

    handled by server 

    • Subtle ,eatures should be provided to

    reate user awareness o, any loaliIationta$ing plae

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    27/51

    Leyboard & Mouse BoaliIation

    this is an *CA client getting ,etting

    a bit $aster - thanks to KB Blit#"ocali#ation by .ivaamamourthy

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    28/51

    K

    The Disonneted !peration Model

    • pproac! /

     – Provide ,ull lient and a thin version o, the server on themobile plat,orm. 1n addition3 needed data is repliatedinto the mobile plat,orm. Upon reonnetion3 updatedreplias are synhroniIed with the home server. Con,litresolution strategies are needed 2Coda01enus &+racle ite5

    • pproac! /

     – Provide a ,ull lient and a mobility agent that intereptsre-uests to the unreahable server3 emulates theserver3 bu,,ers the re-uests3 and transmit them uponreonnetion 2+racle Mobile gents5

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    29/51

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    30/51

    !pportunisti Computing Model

    •  "n ad%ho networ$ o, mobile devies is

    ,ormed3 eah devie o,,ers servies

    • Some servies may be o, interest to

    mobile users3 or other servies

    • 1mpromptu servie omposition based on

    opportunity rules and user interations

    • Servie deomposition and tear down

    )<

    C. Lee# 2. Helal# . 2rslan# ?onar0@ 2 S!stemand Protocols for Device Independent# Peer5to5Peer Discover! andDeliver! of Mobile Services# t(e IEEE ,ransaction on S!stems# Man

    and C!bernatics# =olume 33#

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    31/51

    );

    #roadast Dis$s

    • Push data dissemination virtual devie

    • 1ndexing on air • Client ahing strategies and ahe

    invalidation algorithms

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    32/51

    )K

    Push/Pull Data Dissemination

    upstreamdownstream

    B!

    • Pull data delivery( lients re-uest 2validate5 data bysending uplin$ msgs to server 

    • Push data delivery( servers push data 2and validationreports5 through a broadast hannel3to a ommunityo, lients

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    33/51

    ))

    #roadast Dis$s

    "eriodic broadcast o# one or more dis$s using a broadcast channel

    %ach dis$ can be bcast at di##erent speed

    Dis$ speed can be changed based on client access pattern

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    34/51

    )+

    inx inx

    inxinx inx

    inx

    inx inx

    inx inx

    1ndexing on "ir 

    • Server dynamially ad@usts broadast hotspot

    •Clients read the index3 enter into doIe mode3 andthen per,orm selective tuning  – Query Time( time ta$en ,rom point a lient issues a -uery until

    answer is reeived

     – Listening Time( time spent by lient listening to the hannel.

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    35/51

    )6

    Cahing in Mobile Client/Server(

    Problems

    • Cashing is ritial to many appliations suh as Eebbrowsing and ,ile and database systems

    • Classial ahe invalidation tehni-ues do not wor$

    e,,etively in the mobile environment beause o,( – lient disonnetion 2call-backs do not wor$5

     – slow and limited up%lin$ bandwidth ,or lientinvalidation 2detection approach is ine,,iient5

     – very limited salability ,or appliation servers with

    a large number o, lients – limited ahing apaity due to lient memory and

    power onsumption limitations

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    36/51

    )=

    Cahing in Mobile Client/Server(

    Solutions

    • ariable granularity o, aheohereny 2Coda5

    • #roadast dis$s based aheinvalidation

    J , C

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    37/51

    )A

    aried Jranularity o, Cahe

    Cohereny in oda

    • Server maintains version stamps ,or eah ob@etand its ontaining volume. Ehen an ob@et isupdated3 the server updates its version stamp

    and that o, its ontaining volume.• 1n antiipation o, disonnetion3 lients ahe

    volume version stamps

    • Upon reonnetion3 lients present volume

    version stamps to server ,or validation• 1, valid3 so is every ob@et ahed at the lient3

    otherwise3 ahed ob@ets are invalidatedindividually

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    38/51

    )

    #C Dis$ based Cahe 1nvalidationCahe 1nvalidation *eports

    • Server bast invalidation report showing all items

    updated within preeding w  seonds

    • Client onneted( invalidation is straight,orward

    • Clients must invalidate their entire ahe i, their

    disonnetion period exeeds w  seonds.

    id& tsid& tsid& tsid& tsid& ts

    Broadcast periodTime !indow

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    39/51

    Cloud5Mobile & C!ber "oraging

    Models

    • Similar to t(in client but it is notBuite t(in.

    • =irtuali4ed replica of t(e MobilePlatform 6or client9

    • +utsourced computations performedon t(e cloud replica using cloud

    resources onl! results are s!nced. ason "linn# C!ber "oraging@ >ridging Mobile and Cloud Computing#FPervasive and Mobile Computing S!nt(esis lectures. September %8'% 6pdf 92. 2bu0mail and 2. Helal# Energ! Management for Mobile Devicest(roug( Computation +utsourcing -it(in Pervasive Smart Spaces#F.

    6pdf 9

    http://www.morganclaypool.com/doi/pdf/10.2200/S00447ED1V01Y201209MPC010http://www.icta.ufl.edu/projects/publications/IEEE%20TOMC-abukmail%20paper.pdfhttp://www.icta.ufl.edu/projects/publications/IEEE%20TOMC-abukmail%20paper.pdfhttp://www.morganclaypool.com/doi/pdf/10.2200/S00447ED1V01Y201209MPC010

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    40/51

    Case Studies

    +<

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    41/51

    +;

    'ile System Proxy in oda

    Disconnected oeration '(enus): hoarding& emulating& reintegrating

    !eakly connected oeration: both ob*ect and volume call-bac$s

    Isolation"#nly Transactions

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    42/51

    +K

    1solation%!nly Transations

    in oda

    Isolation"#nly Transactions $ AC  I  D%& no #ailure atomicity guarantees+

    ,lso Durability is guaranteed only conditionally+

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    43/51

    +)

    Eeb Proxy in !eb"xpress

    The !eb%press .ntercept /odel

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    44/51

    ++

    !dyssey

    • !dyssey lient arhiteture

    • !dyssey system omponents

    • !dyssey appliations(

     – ideo player 

     – Eeb browser 

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    45/51

    +6

    !dyssey Client "rhiteture

    Cache /anager 

    (iceroy 0eneric Support

    ,". %tensions 'Kernel)

    ,pplications

    !ardens Type-Speci#icSupport

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    46/51

    +=

    Main 'eatures o, !dyssey

    •  "ppliation%aware adaptation approah

    • !dyssey monitors system resoures andnoti,ies appliations o, relevant hanges

    •  "ppliations deide when and how to adapt3 tomaintain ertain level o, ,idelity

    • Jeneral support ,or adaptation( #iceroy 

    • Type%spei,i support( !arden

    • Cahing support

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    47/51

    +A

    !dyssey System Components

    • !dyssey !b@ets

    • Client "P1 to allow appliations to(

     – operate on !dyssey ob@ets

     – express resoure needs 2expetations5

     – be noti,ied when needed resoures are no

    longer available – respond by hanging levels o, ,idelity

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    48/51

    +

    !dyssey "P1

     Request( in path, in resource_descriptor, out request_id)

    Cancel(in request_id)

     Resource_id 

    lower bound 

    upper bound 

    name of upcall handler 

    Tsop( in path, in opcode, in insize, in inbuf, in out outsize, out outbuf)

     Handle( in request_id, in resource_id, in resource-level)

     etwor! "andwidth b#tes$second 

     etwor! %atenc# microseconds

     &is! cache 'pace ilob#tes

    C* '+CCint

     "atter# ower minutes

     .one# cents

    Resource Ne'otiation #erations

    (eneric Resources in #dyssey

    Resource Descritor Fileds

    Tye"secific #erations

    )call *andler

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    49/51

    +F

    ideo Player in !dyssey

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    50/51

    6<

    !eb Browser in 1dyssey

  • 8/18/2019 2016 Lecture3 Mobile Computing Models

    51/51

    !dyssey( Summary

    ,pplications 2ile system access& video playing& and !eb browsing+

    ,daptation ,pplication-aware adaptation with the systemsupport that provides resource monitoring& noti#ies

    applications o# resource changes& and en#orces

    resource allocation decisions+

    /odel Classic client-server architecture+

    /obile Data Distilled server data delivery based on the client

    2eedbac$s+