ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Slides:



Advertisements
Similar presentations
CS 542: Topics in Distributed Systems Diganta Goswami.
Advertisements

Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
Consistency and Replication
Serverless Network File Systems. Network File Systems Allow sharing among independent file systems in a transparent manner Mounting a remote directory.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Sleepers & Workaholics Caching Strategies in Mobile Computing Dr. Daniel Barbará Dr. Tomasz Imielinski.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Distributed Systems 2006 Styles of Client/Server Computing.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Distributed Resource Management: Distributed Shared Memory
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
Caching And Prefetching For Web Content Distribution Presented By:- Harpreet Singh Sidong Zeng ECE Fall 2007.
Web Caching Schemes For The Internet – cont. By Jia Wang.
Client-Server Computing in Mobile Environments
Computer Measurement Group, India Reliable and Scalable Data Streaming in Multi-Hop Architecture Sudhir Sangra, BMC Software Lalit.
Distributed Deadlocks and Transaction Recovery.
1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.
CH2 System models.
Distributed File Systems Case Studies: Sprite Coda.
Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
CS 5204 (FALL 2005)1 Leases: An Efficient Fault Tolerant Mechanism for Distributed File Cache Consistency Gray and Cheriton By Farid Merchant Date: 9/21/05.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Data Versioning Lecturer.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
CSE 535 – Mobile Computing Lecture 8: Data Dissemination Sandeep K. S. Gupta School of Computing and Informatics Arizona State University.
Mobile Data Access1 Replication, Caching, Prefetching and Hoarding for Mobile Computing.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
1 Lecture 2: Service and Data Management Ing-Ray Chen CS 6204 Mobile Computing Virginia Tech Fall 2005 Courtesy of G.G. Richard III for providing some.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
CS425 / CSE424 / ECE428 — Distributed Systems — Fall 2011 Some material derived from slides by Prashant Shenoy (Umass) & courses.washington.edu/css434/students/Coda.ppt.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Distributed Systems CS Consistency and Replication – Part IV Lecture 21, Nov 10, 2014 Mohammad Hammoud.
Computer Science Lecture 14, page 1 CS677: Distributed OS Last Class: Concurrency Control Concurrency control –Two phase locks –Time stamps Intro to Replication.
Information/File Access and Sharing Coda: A Case Study J. Kistler, M. Satyanarayanan. Disconnected operation in the Coda File System. ACM Transaction on.
Feb 5, ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps Data Dissemination and Management 2 of 3 Lecture 7 Paul I-Hai Lin, Professor Electrical.
ENERGY-EFFICIENCY AND STORAGE FLEXIBILITY IN THE BLUE FILE SYSTEM E. B. Nightingale and J. Flinn University of Michigan.
HTTP evolution - TCP/IP issues Lecture 4 CM David De Roure
DCIM: Distributed Cache Invalidation Method for Maintaining Cache Consistency in Wireless Mobile Networks.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Energy-Efficient Data Caching and Prefetching for Mobile Devices Based on Utility Huaping Shen, Mohan Kumar, Sajal K. Das, and Zhijun Wang P 邱仁傑.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Distributed Systems CS Consistency and Replication – Part IV Lecture 13, Oct 23, 2013 Mohammad Hammoud.
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT By Jyothsna Natarajan Instructor: Prof. Yanqing Zhang Course: Advanced Operating Systems.
20 Copyright © 2008, Oracle. All rights reserved. Cache Management.
Ad Hoc On-Demand Distance Vector Routing (AODV) ietf
Wireless Cache Invalidation Schemes with Link Adaptation and Downlink Traffic Presented by Ying Jin.
A proxy-based integrated cache consistency and mobility management scheme for client-server applications in Mobile IP systems - Weiping He, Ing-Ray Chen.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Feb 5, ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps Data Dissemination and Management 3 of 4 Lecture 8 Paul I-Hai Lin, Professor Electrical.
Mobile File Systems.
Chapter 25: Advanced Data Types and New Applications
Data Dissemination and Management - Topics
The University of Adelaide, School of Computer Science
Lecturer : Dr. Pavle Mogin
Data Dissemination and Management (2) Lecture 10
Ivy Eva Wu.
CSE 4340/5349 Mobile Systems Engineering
Outline Midterm results summary Distributed file systems – continued
CSE 4340/5349 Mobile Systems Engineering
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
The University of Adelaide, School of Computer Science
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Distributed Resource Management: Distributed Shared Memory
Lecture 17 Multiprocessors and Thread-Level Parallelism
Lecture 18: Coherence and Synchronization
The University of Adelaide, School of Computer Science
Data Dissemination and Management (3)
Data Dissemination and Management (2) Lecture 10
Presentation transcript:

ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps Data Dissemination and Management 4 of 4 Lecture 9 Paul I-Hai Lin, Professor Electrical and Computer Engineering Technology Indiana University-Purdue University Fort Wayne Feb 12, 2007

Data Dissemination and Management - Topics Mobile Data Caching Mobile Cache Maintenance Schemes Mobile Web Caching Summary Feb 12, 2007

Mobile Data Caching Memory Hierarchy Cache Processor (CPU) Registers Main memory (RAM/ROM) Mass storages: disks, tapes Cache Small, Fast memory for holding frequently used data Improvements Improving Data Access Latencies Improving Data Availability Cache management schemes Feb 12, 2007

Cache management schemes Mobile Data Caching Cache management schemes Predict/estimate which data items are most likely to be used in the future Copy them to the cache memory (closer to the processor) Cache miss LRU (Least-Recently Used) and Prefetching algorithms Feb 12, 2007

Mobile Data Caching Caching in Traditional Distributed Systems Distributed Systems and Network Computing Environments Scenario 1 Data in the shared memory or servers Data can be read or written by different clients concurrently (Distributed File System) Scenario 2 Data are read-only for the clients (WWW) Data may be replicated onto multiple servers: improve fault tolerance and availability A client just modified the data item before another client access it Feb 12, 2007

Mobile Data Caching Caching in Traditional Distributed Systems Distributed Systems and Network Computing Environments Most Crucial Problem for caching How to maintain data consistency among the clients and servers Complexity arises from the various failures Server Failure Network Failure Client Failure Approaches used to maintain data consistency Polling every time Adaptive time to live Leases-based invalidation Feb 12, 2007

Mobile Data Caching Cache Consistency Maintenance Data Currency Requirement Cache Consistency Maintenance Schemes WWW Distributed File Systems Client-Server Databases Cache Consistency Models Classic Techniques Strong Consistency Feb 12, 2007

Mobile Data Caching Cache Consistency Maintenance Cache Consistency Models Classic Techniques Distributed computing environment connected via reliable wired links Call backs and Validity Checks Not suitable for Mobile client (lost connection, etc) Refetching data – wasting bandwidth Strong Cache Consistency Model: Data x(t) is the most recent x(t)? Checked with the server before access Mobile computing environment – make it unusable when disconnections become frequent Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Various issues and Considerations for Designing Mobile Caching Strategies Data access pattern Data update rate Communication/access cost Mobility pattern of the client Connectivity characteristics (disconnection frequency, available bandwidth) Data currency requirements of the User (user expectations) Context dependence of the information Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Need to address the following problems How to reduce client-side latency How to maintain cache consistency between various cache and the servers Being studied extensively in distributed systems and wired networking environments Not new to mobile computing environments Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Need to address the following problems How to ensure high data availability in the presence of frequent disconnections How to achieve high energy/bandwidth efficiency How to determine the cost of a cache miss and how to incorporate this cost in the cache management scheme How to manage location-dependent data in the cache These 4-problems are new to the mobile computing environment Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Need to address the following problems How to enable cooperation between multiple peer caches Need to consider Peer-to-Peer paradigm Ad Hoc Networks Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Cache Organization Issues Where do we cache? Server? Proxy? Client? Frequency, Pattern, Cost of access At server: aggregated access pattern, retrieving cost At proxy and client: access pattern, communication cost, update rate How many levels of caching do we use (hierarchical caching)? What do we cache (when to cache a data item and for how long)? How do we invalidate cached items? Feb 12, 2007

Mobile Data Caching Performance and Architectural Issues Cache Organization Issues Who is responsible for invalidations? What is the granularity at which the invalidation is done? What data currency guarantees can the system provide to users? What are the cost involved? How do we charge users? What is the effect on query delay (response time) and system throughput (query completion rate) Feb 12, 2007

Mobile Cache Maintenance Schemes A Taxonomy of Cache Maintenance Schemes (classification) Cache Consistency Requirements Strong Cache Consistency (always up-to-date) Polling Every Time Scheme Invalidating Data On Modification Scheme Weak Cache Consistency (some degree of inconsistency) TTL (Time-To-Live) -based Consistency Strategies Pre-assigned TTL value Adaptive TTL Approach Feb 12, 2007

Mobile Cache Maintenance Schemes Polling Every Time Strategies A special case of TTL with TTL field Invalidating-Based Strategies Stateless Approach – server does not maintain info (how long) about the cache contents of the clients Stateless Asynchronous approach Stateless Synchronous approach Stateful Approach – server keep tracking the cache contents of its clients Stateful Asynchronous approach – use a Home Location Cache Stateful Synchronous approach Feb 12, 2007

Mobile Cache Maintenance Schemes TTL-based Consistency Strategies Pre-assigned TTL value Adaptive TTL Approach Feb 12, 2007

Mobile Cache Maintenance Schemes Cache Maintenance for Push-Based Information Dissemination A Scenario Data item x is accessed 1% of the time at a client C and x is also broadcast 1% of the time Date item y is accessed 0.5% of the time at client C, but is broadcast only 0.1% of the time The time period of two occurrence of data items: Data item y time ty = 10 * tx of data item x Cache x instead of y? Affect the average data access delay Feb 12, 2007

New Cache Management Schemes for Push-based Information System Mobile Cache Maintenance Schemes Cache Maintenance for Push-Based Information Dissemination New Cache Management Schemes for Push-based Information System Consider the cost of a cache miss All misses – not the same cost Feb 12, 2007

Metrics used in Mobile Computing Environment Mobile Cache Maintenance Schemes Cache Maintenance for Push-Based Information Dissemination Metrics used in Mobile Computing Environment Hit Ratio The fraction of total data requests satisfied from the cache Depends on cache management algorithms Cache size Request pattern Assume that all cache misses have the same cost (not necessary hold in weakly connected environment) Miss cost – depends on data size and timing Feb 12, 2007

Mobile Cache Maintenance Schemes Cache Maintenance for Push-Based Information Dissemination New Metrics Representing Different Cache Costs in Mobile Computing Environment PIX The access probability of data item d is P The broadcast frequency – X PIX of data item d is P/X Cost-Based Page-Replacement Algorithm using PIX Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Invalidation Reports Cache Consistency Management Schemes based on Broadcasting Invalidation Reports Broadcasting Timestamp (BT) Scheme – Fig 3.7 A Variant of Broadcasting Invalidation Report (Jing and Colleagues, 1997) - Adjust the size of the invalidation report to minimize the use of wireless bandwidth while retaining the effectiveness of cache validation Two-Level Caching Scheme based on mobility agents that takes into account the Mobility Pattern (Liu and Maguire, 1996) Broadcasting Invalidation Report methods take into account the update and query rate/patterns and client disconnection time to optimize query cost (Hue and Lee 1998) Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Timestamp Scheme Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Timestamp Scheme Data server periodically broadcasting invalidation reports All the invalidations in a time window of the last w time units Window size w: how long a client can sleep (disconnected from the network) An invalidation notification from the server: (id, ts) id: identifier of a data item ts: timestamp denoting the time when data item was modified, i.e. t: the time when the invalidation report was sent by the server t – w ≤ ts ≤ t Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Timestamp Scheme A Mobile Client m Received an Invalidation Report with timestamp t: IR(t); within w time units from last invalidation report Performs (For each data item id in m’s cache) Find each data item id in m’s cache with (id, ts) found in report IR(t) If timestamp < ts, stale the cache entry for id, and delete the data item Otherwise set the timestamp = t for the cached entry Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Timestamp Scheme A Mobile Client m Sleeping window size w time units (disconnected from the network) Sleeping longer than w time units On receipt of an IR Discard all the items in its cache (or revalidate before use) Validates the cache entry Feb 12, 2007

Mobile Cache Maintenance Schemes Broadcasting Invalidation Reports Other Cache Consistency Management Schemes based on Broadcasting Invalidation Reports Common Characteristics Stateless server, and neglect the issue of mobility The entire cache is invalid if the client is disconnected for a period longer than the period of the broadcast Feb 12, 2007

Mobile Cache Maintenance Schemes Disconnection Operation Some information is better than no information Disconnection Operation Is permitted if data availability is more important than data consistency Should not be permitted If obtaining current data is more important Trade-off Availability Consistency Feb 12, 2007

Mobile Cache Maintenance Schemes Disconnection Operation – Coda System A distributed file system, assumes a stateful server Support disconnected operations on shared files in UNIX-like environments Coda Clients Hoarding files (a cache maintenance scheme) What data items (files) do we hoard? use Prioritized Scheme with user assigned priorities on data items When and how often do we perform hoarding? How do we deal with cache misses? How do we reconcile the caches version of the data items with the version at the server? Feb 12, 2007

Mobile Cache Maintenance Schemes Disconnection Operation – Coda System What data items (files) do we hoard? A prioritized scheme with user assigned priorities on data items When and how often do we perform hoarding? How do we deal with cache misses? How do we reconcile the caches version of the data items with the version at the server? Periodical “Hoard Walk” is performed on the cache Ensure that no un-cached objects has a higher priority than any cached objects Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme AS Scheme ensures that the data returned to a mobile client is t most t second old, where t is the max latency of forwarding an I.R. from the server to the client via its HA Designed for applications that require strict data currency guarantees and in which access to stale data is undesirable Such applications include access to critical data such as Bank Account info, and Air Traffic Info Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Use Cache consistency maintenance through Asynchronous invalidation reports (call backs) Send Invalidation reports to mobile client (MH) only when some data changes Home Agent Keep track of what data have been locally cached at its mobile hosts (cache state info of the mobile host) A HA can be maintained at any trusted static host Pass all messages between the Mobile Host and Data server To assist with handling disconnections Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Home Location Cache HLC can be viewed as a Proxy Hold a list of records for Mobile Hosts (x, T, Invalid Tag) x – Identifier of a data item T – Timestamp of the last invalidation of x Invalid Tag – TRUE (invalidation has been sent to the host, but no ACK yet) Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Assume the following Computing (Operation) Scenario The application program runs on the client and communicates with the data server through messages Client Request Data Item Client → Uplink Request (Query) → Data Server Client saves some data in its local memory to minimize the number of data request Data Server Replying Data Server → Downlink Reply (data) → Client Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Assumptions No message is lost due to communication failure or otherwise in the wired network Data server update any data items → Send an Invalidation Message → all Home Agents via the wired network Home Agents forwards Invalidation Message to the relevant Mobile Host Mobile Host Can detect if connected to the network or not Receives the Invalidation Message (through roaming and is not disconnected) Informs HA before it stores (or updates) any data item in its local cache Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme A Mobile Host (MH) operates in two modes In the Sleep Mode Unable to receive any invalidation messages Suspends processing of any queries from the applications Each Mobile Host maintains a Cache timestamp for holding the timestamp of the last message received from its Home Agent The HA uses the cache timestamp to discard invalidations that is no longer needs Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme A Mobile Host (MH) operates in two modes Wake up after a Sleep Send a probe message to its HA with its cache timestamp The probe message is piggy backed on the 1st query after the wakeup to avoid unnecessary probing HA response to the probe message (invalidation check) Sends an invalidation report MH determines which data items changed while disconnected Defers answering all queries that it received, until it has received all the invalidation report from its HA Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme A Example Scenario (Figure 3.9) Cache Timestamp t0 Two data items: IDs x and z Timestamp t1 The HLC received an I. Message noting that data item x changed at the server at time t1 Forward invalidation (x; t1) to HLC and MH MH updates its cache timestamp to t1, and delete x from the cache MH wants to access y by sending a data request (y;t1) to the HLC HLC responds, fetches y, and send it (y; t2) Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Timestamp t2 MH updates its timestamp to t2, adds y to the cache Timestamp t3 MH get disconnected – sleep mode y changed, and Invalidation message for y is lost Timestamp t4 Wakeup Z changed, and invalidation message for z is sent Ignore all invalidation messages until the 1st query Query + Probe (*, t2) Timestamp t5 Invalidate message (y,x,t5) Feb 12, 2007

Mobile Cache Maintenance Schemes Asynchronous Stateful (AS) Scheme Feb 12, 2007

Mobile Cache Maintenance Schemes To Cache Or Not If x is never modified – cache a copy at MH m If x is modifiable? Decision to cache x? SA Always SA Never Online Algorithms (Dynamic Optimization) Feb 12, 2007

Mobile Cache Maintenance Schemes To Cache Or Not Sliding-Window Dynamic Data Allocation Scheme (Sistla, Wolfson, and Huang – 1998): determine when to cache a data item a mobile client Choose AS Always or SA Never based on the recent access pattern history The history is maintained as a window of size k, and relevant access operations Read operation at the mobile node (rm) Write operation at the server (ws) The irrelevant operations Write operation at the mobile node (wm) Read operation at the server (rs) Feb 12, 2007

Mobile Cache Maintenance Schemes Sliding-Window Dynamic Data Allocation Scheme A Schedule ψ is a sequence of relevant operations Ψ = (ws, rm, rm, ws) Two write by the Server Two read by the mobile node Feb 12, 2007