04-mapps3

Embed Size (px)

Citation preview

  • 8/13/2019 04-mapps3

    1/37

    Mobile Applications

    Cellular Networks Email/Web/Location services

    Intranet application access

    Wireless application protocol

    Wireless LANs Client-Server adaptations

    Disconnected operations

    Ad-hoc Networks

    Vehicular applications Emergencies

    Data broadcasting

    Mobile agents

  • 8/13/2019 04-mapps3

    2/37

    Variability of the Mobile Environment

    Connectivityconnected

    semi-connected

    (asymmetric)weakly connected

    disconnected

    Mobile Device Capability

    form factorWindows based GUI

    multimedia

    real-time multimedia

    Mobilitystationary

    nomadic (pedestrian speed)

    mobile (vehicular speed)roaming (mobile across networks)

    Source: Helal

  • 8/13/2019 04-mapps3

    3/37

    Mobile Applications - 1

    Vehicles transmission of news, road condition etc

    ad-hoc network with near vehicles to prevent accidents

    Emergencies early transmission of patient data to the hospital

    ad-hoc network in case of earthquakes, cyclones

    military ...

    Traveling salesmen

    direct access to central customer files

    consistent databases for all agents

    mobile office

  • 8/13/2019 04-mapps3

    4/37

    Mobile Applications - 2

    Web access outdoor Internet access

    intelligent travel guide with up-to-date location dependentinformation

    Information services

    push: stock quotes; pull: nearest cash ATM

    find nearest printer (Jini services)

    Disconnected operations file-system caching for off-line work

    mobile agents, e.g., shopping

    Entertainment

    ad-hoc networks for multi user games

  • 8/13/2019 04-mapps3

    5/37

    World Wide Web and Mobility

    HTTP/HTML have not been designed for mobile applications/devices

    HTTP 1.0 characteristics designed for large bandwidth, low delay

    stateless, client/server, request/response communication

    connection oriented, one connection per request

    TCP 3-way handshake, DNS lookup overheads big protocol headers, uncompressed content transfer

    primitive caching (often disabled, dynamic objects)

    security problems (using SSL/TLS with proxies)

    HTML characteristics designed for computers with high performance, color high-

    resolution display, mouse, hard disk

    typically, web pages optimized for design, not for communication;

    ignore end-system characteristics

  • 8/13/2019 04-mapps3

    6/37

    System Support for Mobile WWW

    Enhanced browsers client-aware support for mobility

    Proxies

    Client proxy: pre-fetching, caching, off-line use

    Network proxy: adaptive content transformation for connections

    Client and network proxy

    Enhanced servers

    server-aware support for mobility serve the content in multiple ways, depending on client capabilities

    New protocols/languages

    WAP/WML

  • 8/13/2019 04-mapps3

    7/37

    Wireless Application Protocol

    wapforum.org: co-founded by Ericsson, Motorola, Nokia, Phone.com

    Goals deliver Internet services to mobile devices

    independence from wireless network standards

    GSM, CDMA IS-95, TDMA IS-136, 3G systems (UMTS, W-CDMA)

    Browser

    Micro browser, similar to existing web browsers Script language

    Similar to Javascript, adapted to mobile devices

    Gateway

    Transition from wireless to wired world

    Server Wap/Origin server, similar to existing web servers

    Protocol layers

    Transport layer, security layer, session layer etc.

    Telephony application interface

    Access to telephony functions

  • 8/13/2019 04-mapps3

    8/37

    WAP: Reference model and protocols

    Bearers (GSM, CDPD, ...)

    Security Layer (WTLS)

    Session Layer (WSP)

    Application Layer (WAE)

    Transport Layer (WDP)TCP/IP,

    UDP/IP,media

    SSL/TLS

    HTML, Java

    HTTP

    Internet WAP

    WAE comprises WML (Wireless Markup Language), WML Script, WTAI etc.

    Source: Schiller

    Transaction Layer (WTP)

    additional services

    and applications

    WCMP

    A-SAP

    S-SAP

    TR-SAP

    SEC-SAP

    T-SAP

  • 8/13/2019 04-mapps3

    9/37

    WAP: Stack Overview

    WDP (Wireless Datagram Protocol):

    Provides transport layer functions

    Based on ideas from UDP

    WTLS (Wireless Transport Layer Security):

    Provides data integrity, privacy, authentication functions

    Based on ideas from TLS/SSL

    WTP (Wireless Transaction Protocol):

    Provides reliable message transfer mechanisms

    Based on ideas from TCP

    WSP (Wireless Session Protocol):

    Provides HTTP 1.1 functionality

    Supports session management, security, etc.

    WAE (Wireless Application Environment):

    Architecture: application model, browser, gateway, server

    WML: XML-Syntax, based on card stacks, variables, ...

    WTA: telephone services, such as call control, phone book etc.

    Content encoding, optimized for low-bandwidth channels, simple devices

  • 8/13/2019 04-mapps3

    10/37

    WAP: Network elements

    wireless networkfixed network

    WAP

    proxy

    WTA

    server

    filter/WAP

    proxyweb

    server

    filter

    PSTN

    Internet

    Binary WML: binary file format for clients

    Binary WML

    Binary WML

    Binary WML

    HTML

    HTML

    HTML WML

    WMLHTML

    Source: Schiller

  • 8/13/2019 04-mapps3

    11/37

    Origin Servers

    WAE: Logical model

    web

    server

    other content

    server

    Gateway Client

    other

    WAE

    user agents

    WMLuser agent

    WTA

    user agent

    encoders

    &

    decoders

    encodedrequest

    request

    encoded

    response

    with

    content

    response

    with

    content

    push

    content

    encoded

    push

    content

    Source: Schiller

  • 8/13/2019 04-mapps3

    12/37

    Wireless Markup Language (WML)

    Cards and Decks

    Document consists of many cards, cards are grouped to decks

    Deck is similar to HTML page, unit of content transmission

    WML describes only intent of interaction in an abstract manner

    Presentation depends on device capabilities

    Features text and images

    user interaction

    navigation

    context management WMLScript

    Provides general scripting capabilities

    Validity check of user input, local user interaction

    Access to device facilities (phone call, address book etc.)

  • 8/13/2019 04-mapps3

    13/37

    WML: Example

    This is a simple first card!

    On the next you can choose ...

    ... your favorite pizza:

    Margherita

    Funghi Vulcano

    Source: Schiller

  • 8/13/2019 04-mapps3

    14/37

    Application Adaptations for Mobility

    System-transparent, application-transparent

    the conventional, unaware client/server model

    System-aware, application-transparent

    the client/proxy/server model the disconnected operation model

    System-transparent, application-aware

    dynamic client/server model

    data broadcasting/caching

    System-aware, application-aware

    the mobile agent model

  • 8/13/2019 04-mapps3

    15/37

    The Client/Proxy/Server Model

    Proxy functions as a client to the fixed network server

    Proxy functions as a mobility-aware server to mobile client

    Proxy may be placed in the mobile host (Coda), or the fixed

    network, or both (WebExpress)

    Enables thin clientdesign:

    Resource-poor mobile computers

    Application resides on the server

    Keyboard and mouse inputs sent from client to server

    Display outputs sent from server to client

  • 8/13/2019 04-mapps3

    16/37

    Web Proxy in WebExpress

    The WebExpress Intercept Model

    Source: Helal

  • 8/13/2019 04-mapps3

    17/37

    Disconnected Operations: File Systems

    Goals

    Efficient/transparent access to shared files within a mobile environment Support for disconnected operations while maintaining data consistency

    Standard file systems (e.g., NFS) are very inefficient, almost unusable

    Approaches

    Replication of data (copying, cloning, caching)

    Getting data in advance (hoarding, pre-fetching) Main problem: consistency

    Typical mechanisms: strong consistency (via atomic updates)

    Invalidation of caches through a server

    Cannot be used in mobile environments

    Mobile computer may not be connected to network

    One solution: weak consistency

    Tolerate occasional inconsistencies

    Apply conflict resolution strategies subsequently

    Use version numbering, time-stamps (content independent)

    Use dependency graphs (content dependent)

  • 8/13/2019 04-mapps3

    18/37

  • 8/13/2019 04-mapps3

    19/37

    File Systems - Coda

    Hoarding

    user can pre-determine a file listwith priorities

    contents of the cache determined bythe list and LRU strategy

    explicit pre-fetching possible

    periodic updating

    Consistency asynchronous, background

    comparison of files

    system weighs speed of updatingagainst minimization of networktraffic

    Cache misses function of file size and bandwidth

    modeling of user patience: howlong can a user wait for datawithout an error message?

    hoarding

    write

    disconnected

    emulating

    disconnection

    disconnection

    connection

    strong

    connectionweak

    connection

    States of a client

    Source: Schiller

  • 8/13/2019 04-mapps3

    20/37

    Mobile Data Management

    Maximize query capacity of servers, minimize energy/query at client asymmetric links (high b/w from server to client; low b/w from client to

    server)!

    Pull data delivery: clients demand, servers respond

    clients request (validate) data by sending uplink messages to server

    Push data delivery: serversbroadcast data, clients listen

    servers push data (and validation reports) through a broadcast channel,to a

    community of clients

    data are selected based on profiles and registration in each cell

    client energy is saved by needing receive mode only

    scales to any number of clients

    Push and Pull data dissemination: Sharing the channel

    Selective Broadcast: Servers broadcast "hot" information only

    On-demand Broadcast: Servers choose the next item based on requests

  • 8/13/2019 04-mapps3

    21/37

    Organization of Broadcast Data

    Flat: cyclically broadcast the union of the requested data

    Skewed(Random):

    broadcast different items with different frequencies

    goal is that the inter-arrival time between two instances of the same

    item matches the clients' needs

    A B C

    A A B C

  • 8/13/2019 04-mapps3

    22/37

    Broadcast Disks

    Periodic broadcast of one or more disks using a broadcast channel

    Disks can of different sizes and can be broadcast at different speed

    Frequency of broadcasting each item depends on its access probability

    Disk speed can be changed based on client access pattern

    Source: Helal

    B C

    ADisk1

    Disk2

    A B A C

  • 8/13/2019 04-mapps3

    23/37

    inx inx

    inxinx inx

    inx

    inx inx

    inx inx

    Indexing on Air

    Server dynamically adjusts broadcast hotspot

    Clients read the index, enters into doze mode, and then performselective

    tuning

    Query Time: time taken from point a client issues a query until answer is

    received

    Listening Time: time spent by client listening to the channel

    Source: Helal

  • 8/13/2019 04-mapps3

    24/37

    Client Caching in Broadcasting

    Data are cached at clients to improve access time Lessen dependency on the server's choice of broadcast priority

    Traditionally, clients cache "hottest" data to improve hit ratio

    Cache data based on PIX:

    Probability of access (P)/Broadcast frequency (X).

    Cache data replacement

    cost-based is not practical

    requires perfect knowledge of access probabilities

    comparison of PIX values with all resident pages

    Alternative: LIX, LRU with broadcast frequency pages are placed on lists based on their frequency (X)

    lists are ordered based on L, the running avg. of interaccess times

    page with lowest LIX= L/X is replaced

  • 8/13/2019 04-mapps3

    25/37

    Client Cache Invalidation

    Why?

    Value of data may have changed since caching by client

    When? Synchronous: send invalidation reports periodically

    Asynchronous: send invalidation information for an item, as soon

    as its value changes To whom?

    Stateful server: to affected clients

    Stateless server: broadcast to everyone

    What to send?

    invalidation: only which items were updated

    propagation: the values of updated items are sent

    aggregated information/ materialized views

    Another issue

    Commit of transactions involving read and writeby clients

  • 8/13/2019 04-mapps3

    26/37

    The Mobile Agent Model

    Mobile agent receives client request and

    Mobile agent moves into fixed network

    Mobile agent acts as a client to the server

    Mobile agent performs transformations and filtering

    Mobile agent returns back to mobile platform, when theclient is connected

  • 8/13/2019 04-mapps3

    27/37

    Mobile Code

    Definition: Capability to dynamically change the bindings between code

    fragments and the location where they are executed

    Approaches: (Not a totally new concept)

    Remote batch job submission & use of PostScript to control

    printers

    Distributed OS led to more structured approach

    Process Migration

    Object Migration (Mobile Objects) Mobile Code Systems (Mobile Agents)

  • 8/13/2019 04-mapps3

    28/37

    Process Migration

    Transfer of OS process from one m/c to other

    Migration mechanisms handle bindings between

    process and execution environment (e.g. open fds, env variables)

    Provide for load balancing

    Most of these facilities provide transparentprocess

    migration

    Other like Locus provide for some control

    like external signal or migrate( ) system call

  • 8/13/2019 04-mapps3

    29/37

    Object Migration

    Makes possible to move objects among address spaces finer grained mobility with respect to processes

    e..g Emerald system : Different granularity levels - small to

    complex objects

    does not provide complete transparency

    COOL (oo extension of Chorus OS) allows total transparent

    migration

    Process and Object migration address issues when

    code and state are moved among hosts of loosely coupled, small

    scale distributed systems insufficient when applied to large scale settings

  • 8/13/2019 04-mapps3

    30/37

    Mobile Code Systems

    Code mobility is exploited on Internet Scale Large scale, heterogeneous hosts, technologies Strong v/s weak mobility

    Mobility is location aware

    Programming language

    provides mechanisms and abstractions that enable shipping/fetching of code to/from nodes

    Underlying run-time

    supports marshalling, code, check in , security etc

    no knowledge of migration policies

    Applications

    Not just for load balancing

    E-commerce, distributed information retrieval, workflow

  • 8/13/2019 04-mapps3

    31/37

    Mobile Code Systems: Design

    Several Paradigms:

    Client Server Remote Evaluation

    Code on Demand

    Mobile Agent

    Example:

    Two friends Sita and Gita

    interact to make a cake (results of service)

    recipe is needed (know-how about service)

    also ingredients (movable resources) oven to bake (hard to move resource)

    a person to mix ingredients as per recipe (computational componentresponsible for execution of code)

    prepare the cake (execute the service)

    where the cake is prepared (site of execution)

  • 8/13/2019 04-mapps3

    32/37

    Client-Server: CS

    Sita would like to have chocolate cake:

    she does not know the recipe

    she does not have the required ingredients nor an oven

    Sita knows that Gita (who likes baking cakes)

    knows the recipe

    has a well supplied kitchen

    Sita calls Gita asking: Can you make me a chocolate cake please?

    Gita makes the cake and delivers it back to Sita

  • 8/13/2019 04-mapps3

    33/37

    Remote Evaluation: REV

    Sita would like to have chocolate cake: she knows the recipe

    she does not have the required ingredients nor an oven

    Sita knows that Gita (who likes baking cakes) has a well supplied kitchen

    does not know the recipe

    Sita calls Gita asking: Can you make me a chocolate cake please? Here is the recipe

    Gita makes the cake and delivers it back to Sita

  • 8/13/2019 04-mapps3

    34/37

    Code on Demand : COD

    Sita would like to have chocolate cake: she has the required ingredients and an oven

    she does not know the recipe

    Sita knows that Gita knows the recipe (and is willing to share it)

    Sita calls Gita asking:

    Can you tell me the recipe for making chocolate cake please?

    Gita tells her the recipe and Sita makes the cake

  • 8/13/2019 04-mapps3

    35/37

    Mobile Agent: MA

    Sita would like to have chocolate cake: she has the recipe and the required ingredients

    she does not have an oven

    Sita knows that Gita has an oven (and is willing to share it)

    Sita could

    prepare the batter

    go to Gitas place bake the cake

    Several other variations are also possible

  • 8/13/2019 04-mapps3

    36/37

    Mobile Agents: Example

  • 8/13/2019 04-mapps3

    37/37