![Page 1: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/1.jpg)
Semantic Data Caching and Replacement
![Page 2: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/2.jpg)
Outline
Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and Future Work
![Page 3: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/3.jpg)
Motivation
Distributed database Clients are high-end workstations (fat client)
High computational power. Big local storage
![Page 4: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/4.jpg)
Motivation (Contd.)
Effective use of a client is the key to achieving high performance. Less network traffic. Faster response time. Higher server throughput. Better scalability.
![Page 5: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/5.jpg)
Client Caching Architecture
Data-Shipping. Clients process query. Data is brought on-demand from servers. Navigational access.
Object ID (Tuple ID or Page ID).Can be categorized as tuple-based or page-based
Cache Replacement Policies:LRU.MRU.
![Page 6: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/6.jpg)
Client Caching Architecture (Contd.)
Data-Shipping. Problem.
Applications require associative access to data, that is, as provided by relational query languages.
![Page 7: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/7.jpg)
Client Caching Architecture (Contd.)
Query-Shipping. Associative access to data. Problems.
Implementations do not support client caching.
![Page 8: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/8.jpg)
Client Caching Architecture (Contd.)
Semantic Caching. A model that integrates support for associative access
into an architecture based on data-shipping. Advantage.
Exploit the semantic information to effectively manage client cache.
![Page 9: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/9.jpg)
Semantic Caching. Semantic description of the data rather than use record-id
or page-id.Can be used to generate remainder query to send to
server if the requested tuples are not available locally. Information for replacement is maintained as semantic
regions.Low overhead, insensitive to bad clustering.
Cache replacement use value function based on semantic description. Not just LRU or MRU.
Client Caching Architecture (Contd.)
![Page 10: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/10.jpg)
Client Caching Architecture (Contd.)
Data Granularity
Missing Data
Cache Replacement
Page Caching
Group Faulting Temporal locality (LRU, MRU)
Spatial locality (Clustering)
Tuple Caching
Single Faulting
Semantic Caching
Dynamically Group
Remainder Queries
Semantic Locality
![Page 11: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/11.jpg)
Model of Semantic Caching
Remainder Query Semantic Regions Replacement Issues
![Page 12: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/12.jpg)
Remainder Query
Relation Re, query Q, client cache V. Probe query P(Q,V) = Q V can be answered locally. Remainder query R(Q,V) = Q V) should be sent to the server. Example:
Select * from E where. salary< 60,000 and salary >30,000.
Client cache all the tuples,
which salary < 50,000.Q = (salary< 60,000 ) salary >30,000).V = (salary <50,000).P = (salary<50,000) salary >30,000).R = (salary>=50,000) (salary< 60,000 ).
P
Re
V Q
R
![Page 13: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/13.jpg)
Semantic Regions
Cache management and replacement unit. Grouped by semantic value. Each semantic region has a
single replacement value. Described by a constrained formula. Consideration:
Semantic region merge.
(a)Original regions (a)Regions after Q
![Page 14: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/14.jpg)
Semantic Regions
Cache management and replacement unit. Grouped by semantic value. Each semantic region has a
single replacement value. Described by a constrained formula. Consideration:
Semantic region merge.(always merge)
(a)Original regions (a)Regions after Q
![Page 15: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/15.jpg)
Replacement Issues
Temporal locality LRU, MRU
![Page 16: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/16.jpg)
Replacement Issues (Contd.)
Semantic locality Manhattan distance
(Note) Manhattan distance Definition: The distance between two points measured along axes at right angles. In a plane with p1 at (x1, y1) and p2 at (x2, y2), it is |x1 - x2| + |y1 -
y2|.
p1
p2o| p1 p2 | = | p2O | + | p1O |
O
O
O
![Page 17: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/17.jpg)
Simulation and Result
Relation has three candidate keys, Unique2 is indexed and clustered, Unique1 is indexed and unclustered, Unique3 is unindexed and unclustered.
RelSize 10000 Relation size (tuples)
TupleSize 200 Size of tuple (bytes)
TuplePerPage 20 How many tuples per page
QuerySize 1-10% % of relation selected by each query
Skew 90% % of queries within a hot region
HotSpot 10% Size of the hot region (% of relation)
CacheSize 250 Client Cache size (kb)
![Page 18: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/18.jpg)
Simulation and Result (Contd.)
Unique2 (Clustered Index). Performance:
Almost the same. Page-based is slightly better.
Reason: Page-based overhead is smaller.
![Page 19: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/19.jpg)
Simulation and Result (Contd.)
Unique1(Unclustered Index). Performance:
Tuple-based and semantic-based.
are much better.
Reason: Page-based is sensitive to
clustered.
![Page 20: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/20.jpg)
Simulation and Result (Contd.)
Unique3(UnIndexed and Unclustered). Performance:
Semantic-based is better.
Reason: Remainder enables client and server.
process query in parallel.
![Page 21: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/21.jpg)
Simulation and Result (Contd.)
Semantic locality / Manhattan
distance on Unique1. Performance:
Manhattan distance
is better than LRU.
Reason: “Cold regions” will be replaced
faster.
![Page 22: Semantic Data Caching and Replacement. Outline Motivation Client Caching Architecture Model of Semantic Caching Simulations and Results Conclusion and](https://reader036.vdocuments.net/reader036/viewer/2022062511/5519c6c7550346443e8b46bc/html5/thumbnails/22.jpg)
Conclusion and Future Work
Conclusion. A simple model with selection query, semantic caching provides
better performance.
Future work. Implementation issues for complex query, update, deletion, and
insertion: Concurrency control. Consistency. Completeness.
A Predicate-based caching scheme for client-server database architecture. (Arthur M. Keller and Julie Basu)