47663354 mobile computing models

61
Mobile Computing Models Original notes by Sumi Helal

Upload: kunal-dudhat

Post on 05-Jul-2015

67 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 47663354 Mobile Computing Models

Mobile Computing Models

Original notes by Sumi Helal

Page 2: 47663354 Mobile Computing Models

References

5.1: J. Jing, A. Helal, A. Elmagarmid, "Client-Server Computing in Mobile Environments," ACM Computing Surveys, June 1999.

5.2: B. Noble, M.Satyanarayanan, D. Narayanan, J. Tilton, J. Flinn, K. Walker "Agile Application-Aware Adaptation for Mobility," Proceedings of the Sixteenth ACM Symposium on Operating Systems.

5.3: M. Ebling and M. Satyanarayanan, "On the Importance of Translucence for Mobile Computing," Proceedings of the 15th ACM Symposium on Operating Systems Principles, May 1998, , CO

5.4: A. Joseph and M. Kaashoek, "Building Reliable Mobile-Aware Applications using the Rover Toolkit," To appear in ACM Wireless Networks (WINET).

5.5: R. Gray, D. Kotz, S. Nog, D. Rus, and G. Cybenko, "Mobile Agents for Mobile omputing," Technical Report PCS-TR96-285, Dept. of Computer Science, Dartmouth College, May 1996.

5.6: B. Zenel and D. Duchamp, "A General Purpose Proxy Filtering Mechanism Applied to the Mobile Environment," Proceedings of the third annual ACM/IEEE Conference on Mobile Computing and Networking, Sept. 1997.

Page 3: 47663354 Mobile Computing Models

References

5.7 Data Dissemination: 5.7.1: S. Zdonik, M. Franklin, S. Acharya, and R. Alonso, "Are ``Disks in the Air'' Just Pie in the Sky?,"

Proceedings of the IEEE Workshop on Mobile Computing Systems Applications, Santa Cruz, CA, December 1994

5.7.2: S. Acharya, R. Alonso, M. Franklin and S. Zdonik,"Broadcast Disks: Data Management for Asymmetric Communication Environments," Proceedings of the ACM SIGMOD, Conference, San Jose, CA, May 1995.

5.7.3: S. Hameed and N. Vaidya, "Log-time Algorithms for Scheduling Single and Multiple Channel Data Broadcast," Proceedings of the third annual ACM/IEEE Conference on Mobile Computing and Networking, Sept. 1997.

5.8 Client/Server Caching: 5.8.1: J. Jing, A. Elmagarmid, A. Helal, and R. Alonso, Bit-Sequences, "An Adaptive Cache Invalidation

Method in Mobile Client/Server Environments," the ACM-Baltzer Journal on Special Topics in Mobile Networks and Applications (MONET), Volume 2, Number 2, pp115-127, October 1997

5.8.2: H. Lei and D. Duchamp, "An analytical approach to file prefetching," USENIXAnnual Technical

Conference, 1997.

Page 4: 47663354 Mobile Computing Models

Mobile Computing Models

Hierarchy of Computing Models Taxonomy of C/S Adaptations Unaware Client/Server Model Client/Proxy/Server Model Thin Client/Server Model Disconnected Operation Dynamic Client/Server Models Mobile Agents

Page 5: 47663354 Mobile Computing Models

Hierarchy of Computing Models

Fixed Network Servers and clients

Mobile Workflow

MobileClient

Mobile Transaction

Mobile Query

MobileClient

Ad-hoc

Mobile Server

Client/Server

Page 6: 47663354 Mobile Computing Models

Client/Server Computing

Request

Reply

Cache Coherency: - cache invalidation - update propagation

clientcache

Client

Server

ClientState

TLI

RPC

Sockets

RMI

TLI

RPC

Sockets

RMI

Fixed Network

servercache

Page 7: 47663354 Mobile Computing Models

Client/Server Design

Stateless/stateful client/server design Caching and cache invalidation

server invalidates client cache and/or client requests server to validate its cache. file system caching: writes => update propagation

Connectionless/connection-oriented design TCP/IP & Interfaces Other issues: multi-threading &deadlocks

Page 8: 47663354 Mobile Computing Models

Fixed Network C/S Assumptions

Client Connectivity Client is always connected with availability comparable to the

server’s. Server can always invalidate the client cache

Server Availability & Reliability Server is highly available. Reliable if stateless (but state info is exchanged in every C/S

interaction), or if implements recovery procedures (may require client availability)

Network fast*, reliable*, BER < 10-6, bounded delay variance

Page 9: 47663354 Mobile Computing Models

Taxonomy of C/S Adaptations

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 the mobile agent (object) model

System-aware, application-aware

Page 10: 47663354 Mobile Computing Models

The Unaware Client/Server Model

Full client on mobile host and full server on fixed network (SLIP/PPP C/S)

Client and Server are not mobility-aware Client caching does not work as the client can be

disconnected when the server invalidates the cache Not reliable and of unpredictable performance Requires special cache invalidation algorithms to enable

caching despite long client disconnections

Page 11: 47663354 Mobile Computing Models

The Client/Proxy/Server Model

Adding mobility-awareness between the client and the server. Client and server are not mobility-aware.

Proxy functions as a client to the fixed network server, and as a mobility-aware server to the mobile client

Proxy may be placed in the mobile host (Coda’s Venus), or the fixed network, or both (WebExpress)

Application- and user-dependent One advantage: enables thin client design for resource-

poor mobile computers

Page 12: 47663354 Mobile Computing Models

Thin Client/Server Model

Thin client fits in resource poor info appliances Bounded communication Requires at least weak connection CITRIX WinFrame and ICA thin client VNC client InfoPad

Keyboard and mouse events

Display events

ServerThinClient

Page 13: 47663354 Mobile Computing Models

The Disconnected Operation Model

Approach I: Provide full client and a thin version of the server on the mobile

platform. In addition, needed data is replicated into the mobile platform. Upon reconnection, updated replicas are synchronized with the home server. Conflict resolution strategies are needed (Coda/Venus & Oracle Lite)

Approach II: Provide a full client and a mobility agent that intercepts

requests to the unreachable server, emulates the server, buffers the requests, and transmit them upon reconnection (Oracle Mobile Agents)

Page 14: 47663354 Mobile Computing Models

The Dynamic Client/Server Model

Servers (or their thin versions) dynamically relocate between mobile and fixed hosts. Proxies created and relocated dynamically

A spectrum of design and adaptation possibilities Dynamic availability/performance tuning

Page 15: 47663354 Mobile Computing Models

Dynamic Client/Server Model

Mobile objects: applications programmed with dynamic object relocation

policies for adaptation (Rover’s RDOs)

Collaborative Groups: disconnected mobile clients turns into a group of collaborating,

mobile servers and clients connected via an ad-hoc net. (Bayou architecture)

Virtual Mobility of Servers: servers relocate in the fixed network, near the mobile host,

transparently, as the latter moves.

Page 16: 47663354 Mobile Computing Models

The Mobile Agent Model

Mobile agent programmed with platform limitations and user profile receives a request; moves into the fixed network near the requested service

Mobile agent acts as a client to the server, or invokes a client to the server

Based on the nature of the results, experienced communication delays, and programmed knowledge, the mobile agent performs transformations and filtering.

Mobile agent returns back to mobile platform, when the client is connected.

Page 17: 47663354 Mobile Computing Models

Mobile Agents in the Mobile Environment

Page 18: 47663354 Mobile Computing Models

File System Proxy in Coda

Disconnected operation (Venus): hoarding, emulating, reintegrating

Weakly connected operation: both object and volume call-backs Isolation-Only Transactions

Page 19: 47663354 Mobile Computing Models

Isolation-Only Transactions in Coda

Isolation-Only Transactions (ACID): no failure atomicity guarantees. Also Durability is guaranteed only conditionally.

Page 20: 47663354 Mobile Computing Models

The WebExpress Intercept Model

Page 21: 47663354 Mobile Computing Models

Wireless Web Browser in Mowgli

Page 22: 47663354 Mobile Computing Models

Thin Client InfoPad Architecture

Page 23: 47663354 Mobile Computing Models

Mobile Data Management in C/S Design

Push/Pull data dissemination Broadcast disks Indexing on air Client caching strategies and cache invalidation

algorithms

Page 24: 47663354 Mobile Computing Models

Push/Pull Data Dissemination

Pull data delivery: clients request (validate) data by sending uplink msgs to server

Push data delivery: servers push data (and validation reports) through a broadcast channel,to a community of clients

upstreamdownstream

B/W

Page 25: 47663354 Mobile Computing Models

Broadcast Disks

Periodic broadcast of one or more disks using a broadcast channelEach disk can be bcast at different speedDisk speed can be changed based on client access pattern

Page 26: 47663354 Mobile Computing Models

inx inx

inxinx inx

inx

inx inx

inx inx

Indexing on Air

Server dynamically adjusts bcast hotspot Clients read the index, enters into doze mode, and then perform selective

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.

Page 27: 47663354 Mobile Computing Models

Caching in Mobile Client/Server: Problems

Cashing is critical to many applications such as Web browsing and file and database systems

Classical cache invalidation techniques do not work effectively in the mobile environment because of:

client disconnection (call-backs do not work) slow and limited up-link bandwidth for client invalidation

(detection approach is inefficient) very limited scalability for application servers with a large

number of clients limited caching capacity due to client memory and power

consumption limitations

Page 28: 47663354 Mobile Computing Models

Caching in Mobile Client/Server: Solutions

Variable granularity of cache coherency (Coda) Enabling ideas:

Broadcast disks: periodic broadcast of disk-organized data; does not require upstream communication for disk reads

Indexing on the air: broadcast of disk and its index; allows selective tuning; increases access time but reduces tuning time; allows dormant state

Cache cache invalidation: Broadcasting Timestamps [Barbará et al] Bit Sequence [Jing et al]

Page 29: 47663354 Mobile Computing Models

Varied Granularity of Cache Coherency in Coda

Server maintains version stamps for each object and its containing volume. When an object is updated, the server updates its version stamp and that of its containing volume.

In anticipation of disconnection, clients cache volume version stamps

Upon reconnection, clients present volume version stamps to server for validation

If valid, so is every object cached at the client, otherwise, cached objects are invalidated individually

Page 30: 47663354 Mobile Computing Models

Cache Invalidation Reports

Server bcast invalidation report showing all items updated within preceding w seconds Client connected: invalidation is straightforward Clients must invalidate their entire cache if their disconnection period exceeds w

seconds.

id, tsid, tsid, tsid, tsid, ts

Broadcast periodTime Window

Page 31: 47663354 Mobile Computing Models

The Bit-Sequences Caching Strategy

Addresses invalidation report size optimizations: bit-sequence naming (each bit in a BS represents one data

object) update aggregation (one timestamp for a group of updates)

Effectiveness of invalidation report: accuracy of validating the status of cached data items w.r.t. invalidation report size

Addresses invalidation report effectiveness for clients with unpredictable disconnection time

hierarchical structure of BS’s (clients with different disconnection times can use different BS’s in the structure)

Page 32: 47663354 Mobile Computing Models

Basic Bit-Sequences Method

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 0 0 0 1 1 1 1 0 1 0 1 0 0 0 1

0 0 0 1 1 0 1 1

0 1 1 0

1 0

TS(B4)

TS(B1)

TS(B2)

TS(B3)

DB

time

50

200

160

140

B4

B1

B2

B3

Server: Bit-Sequences construction algorithm Client: cache invalidation algorithmDesign: different bit-mapping strategiesReport size: L= 2N+bTlog(N)

Page 33: 47663354 Mobile Computing Models

Bit-Sequences Invalidation Precision

xxx xxx x

UPDATE UPDATE UPDATE

TS(Bk) TS(Bk-2)TS(Bk-1)Td

Scenario 1

xxx xxx x

UPDATE UPDATE UPDATE

TS(Bk) TS(Bk-2)TS(Bk-1)Td

Scenario 2

Page 34: 47663354 Mobile Computing Models

Case Studies

Bayou Odyssey Rover

Page 35: 47663354 Mobile Computing Models

Case Study1: Bayou

Main Features Novel Aspects Bayou architecture Bayou application-specific conflict resolution Bayou replication management

http://www.parc.xerox.com/csl/projects/bayou/

Page 36: 47663354 Mobile Computing Models

Main Features of Bayou

Replicated, weakly consistent storage system for collaborative applications

Ad-hoc network of portable computers participate in managing a mobile, replicated storage system

Suitable for a group of collaborators, all mobile and disconnected from fixed network, sharing (reading/writing) appointment calendars, meeting notes, evolving design documents, etc.

Page 37: 47663354 Mobile Computing Models

Novel Aspects of Bayou

Support for application-specific detection and resolution of update conflicts

dependency checksclient-provided, per-write conflict resolution (merge procedures)

Eventual replica convergence through a peer--wise anti-entropy processPer-client consistency guaranteesRoll-back and undo capabilities

Page 38: 47663354 Mobile Computing Models

The Bayou Architecture

Anti-entropy

StorageSystem

Server State

StorageSystem

Server State

StorageSystem

Server State

StorageSystem

Server State

Bayou API

Application

Client Stub

Bayou API

Application

Client Stub

Client ServerReador

Write

Reador

Write

Server

Server

Server

Client

Page 39: 47663354 Mobile Computing Models

Application-Specific Conflict Resolution in Bayou

Along with desired update, a write operation includes a dependency check:

server query & expected query results

As a pre-condition to performing the write operation, the dependency check must succeed

A conflict is detected if query, when run against server data, does not produce same results.

Page 40: 47663354 Mobile Computing Models

Application-Specific Conflict Resolution in Bayou

If dependency check fails, write is not performed and server runs a merge procedure:

also submitted along with the write operation templates or rules written in a high-level interpretive language uses server data and application-specific data to resolve the

conflict when run, produces a revised update request

Write operations are atomic

Page 41: 47663354 Mobile Computing Models

Conflict Resolution in Bayou

Example (Application-specific):Write {

reserve an hour time slot by meeting room sched application;dependency_check: (list of previously scheduled meetings

that overlap with requested time slot, NULL);merge_procedure: ();

}

Others: detect read/write conflicts detect write/write conflicts

Page 42: 47663354 Mobile Computing Models

Replication Management in Bayou

Clients send their writes to only one server (weak consistency)

Bayou servers propagate their writes during pair-wise contacts. This process is called Anti-entropy and results on the two server agreeing on the writes and their order.

Eventually all writes will reach all servers (eventual consistency)

Page 43: 47663354 Mobile Computing Models

Bayou: Summary

Applications Non-real time collaborative applications: meetingroom scheduler and bibliographic database,appointment calendars, evolving design documents,news bulletin boards.

Adaptation Application-specific adaptation to disconnectionand intermittent connectivity; applications arepermitted to make trade-off of replicated dataconsistency and availability by using individuallyselectable session guarantees.

Model Disconnected collaborative group; full (ordisconnected) client architecture.

Mobile Data System support for detection of update conflicts,application-specific resolution of update conflicts,eventual replica convergence through a peer-wiseanti-enthropy process, and per-client consistencyguarantees.

Page 44: 47663354 Mobile Computing Models

Case Study 2: Odyssey

Odyssey client architecture Odyssey system components Odyssey applications:

Video player Web browser

Page 45: 47663354 Mobile Computing Models

Odyssey Client Architecture

Cache Manager

Viceroy Generic Support

API Extensions (Kernel)

Applications

Wardens Type-Specific Support

Page 46: 47663354 Mobile Computing Models

Main Features of Odyssey

Application-aware adaptation approach Odyssey monitors system resources and notifies

applications of relevant changes Applications decide when and how to adapt, to

maintain certain level of fidelity General support for adaptation: Viceroy Type-specific support: Warden Caching support

Page 47: 47663354 Mobile Computing Models

Odyssey System Components

Odyssey Objects Client API to allow applications to:

operate on Odyssey objects express resource needs (expectations) be notified when needed resources are no longer available respond by changing levels of fidelity

Page 48: 47663354 Mobile Computing Models

Odyssey API

Request( in path, in resource_descriptor, out request_id)Cancel(in request_id)

Resource_idlower boundupper boundname 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)

Network Bandwidth bytes/secondNetwork Latency microsecondsDisk cache Space KilobytesCPU SPECCint95Battery Power minutesMoney cents

Resource Negotiation Operations

Generic Resources in Odyssey

Resource Descriptor Fileds

Type-specific Operations

Upcall Handler

Page 49: 47663354 Mobile Computing Models

Video Player in Odyssey

Page 50: 47663354 Mobile Computing Models

Web Browser in Odysset

Page 51: 47663354 Mobile Computing Models

Odyssey: Summary

Applications File system access, video playing, and Webbrowsing.

Adaptation Application-aware adaptation with the systemsupport that provides resource monitoring, notifiesapplications of resource changes, and enforcesresource allocation decisions.

Model Classic client-server architecture.Mobile Data Distilled server data delivery based on the client

Feedbacks.

Page 52: 47663354 Mobile Computing Models

Case Study 3: Rover

Basic features of Rover Novel features of Rover Rover system components Constructing mobile applications using Rover Rover applications

Page 53: 47663354 Mobile Computing Models

Basic Features of Rover

Rover is a ToolKit for developing applications that can be used in both the fixed and mobile environment

Supports both application-transparent and application-aware adaptations

Supports the dynamic client/server model Can build Rover apps from scratch or migrate

existing apps (with some effort) to be mobile

Page 54: 47663354 Mobile Computing Models

Novel Features of Rover

Support for: Mobile objects disconnected operation dynamic client/server

Mixed communication/computation modes: Relocatable Dynamic Objects (RDO) Queued Remote Procedure Calls (QRPC)

Applications decide to use RDO or QRPC

Page 55: 47663354 Mobile Computing Models

Relocatable Dynamic Objects (RDO)

Objects can be relocated from the fixed network to the mobile computer. Client applications then interacts directly with the local copy of the RDA

If cached RDO is updated it can be tentatively considered the primary copy and is exported back to the fixed network

Advantages: Performance (under weak connectivity) and functionality (under disconnections)

Page 56: 47663354 Mobile Computing Models

Queued RPC (QRPC)

Non-blocking remote procedure calls, even when fixed host is disconnected

Client applications use QRPC to fetch RDO’s. Upon connection, or when an RDO arrives, the requesting client is called back

QRPC is also used to commit updates made to RDO’s Non-executed QRPC’s are kept in an operation log As network connection comes and goes, the operation

logs are flushed back to the servers

Page 57: 47663354 Mobile Computing Models

Rover’s Relocatable Dynamic Object (RDO) Architecture

Page 58: 47663354 Mobile Computing Models

Rover Component Architecture

erver

Page 59: 47663354 Mobile Computing Models

Constructing Mobile Applications in Rover

Split the application into clients and servers modules Decide where each module resides initially (mobile host

or fixed network) Encapsulate each module as an RDO Add application-specific semantics to RDOs Add application-specific conflict resolution procedures.

Page 60: 47663354 Mobile Computing Models

Rover Applications

Application-transparent adaptation Rover NNTP proxy and Rover HTTP proxy

Application-aware adaptation Rover Exmh (mail browser), Rover Webcal (distributed calendar

system), Rover Irolo (graphical Rolodex tool), and Rover stock market watcher

Page 61: 47663354 Mobile Computing Models

Rover: Summary

Applications E-mails, appointments, to do lists, reminders,calendars; and web pages and images.

Adaptation Application-aware adaptation with the use of RoverToolkits that deal with intermittent and low-bandwidth connection and resource-poor clients;application-transparent adaptation by using Roverproxies.

Model Dynamic client-server architecture with the use ofRDO’s.

Mobile Data Asynchronous and disconnected operations with thesupport of QRPC.