Two-Level Cache for Path Resolution Overhead
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional path resolution in hierarchically-organized data systems, such as relational database systems, incurs significant overhead due to disk access for each segment of a path expression, especially in large repositories with deep hierarchies and frequent access to small or medium-sized resources.
Innovation Solution
A two-level cache system comprising a system-wide shared cache and a session-level cache is implemented, where the shared cache is organized as a hierarchy of hash tables mirroring the repository structure, and the session-level cache tracks resource information associated with path expressions, minimizing disk retrieval by leveraging locality across sessions and requests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional path resolution is used in hierarchically-organized data systems, then path expressions can be resolved, but significant overhead is incurred due to disk access for each segment of the path expression
Solution Approach 1:
The system performs preliminary action by loading frequently accessed path segments and their mappings into memory caches before they are needed for path resolution. The shared cache pre-loads path segment mappings from disk into memory, and the session-level cache pre-loads path expressions that are likely to be accessed again, thereby eliminating subsequent disk access delays when these paths are needed.
Solution Approach 2:
The patent introduces an intermediary caching layer between the disk-based path resolution system and the application. The shared cache and session-level cache act as intermediaries that intercept path resolution requests, provide cached mappings when available, and only access the disk-based resource table when necessary, thereby mediating between the need for fast access and the need for persistent storage.
2Productivity
If a cache system is implemented to reduce disk access, then path resolution overhead is reduced, but device complexity increases due to the two-level cache structure
Solution Approach 1:
The caching system is segmented into two distinct levels: a shared cache that is common across all sessions and a session-level cache that is private to each session. This segmentation allows each cache level to serve specific purposes - the shared cache handles frequently accessed path segments across multiple sessions, while the session-level cache handles path expressions specific to each session's workload patterns, thereby managing complexity through functional division.
Solution Approach 2:
The patent adds another dimension to the caching architecture by introducing session-level specificity on top of the existing shared cache. Instead of a single uniform cache, the system extends the caching dimension to include session context, creating a hierarchical cache structure where session-level cache entries can leverage shared cache entries, thereby adding a new dimension of organization to manage complexity.
3Productivity
If the shared cache is organized as a hierarchy of hash tables mirroring the repository structure, then path resolution efficiency is improved, but memory usage increases
Solution Approach 1:
The shared cache employs local quality by organizing hash tables at different levels of the hierarchy with different granularities. Upper-level hash tables store mappings for parent containers that are accessed frequently across multiple sessions, while lower-level hash tables store mappings for child resources. This local quality differentiation allows the cache to prioritize memory resources toward the most frequently accessed path segments, improving efficiency without uniformly increasing memory usage throughout the entire hierarchy.
Solution Approach 2:
The system applies partial action by selectively caching only those path segments and resource mappings that are actually accessed during operation, rather than caching the entire repository hierarchy. The hash table structure allows for partial population of cache entries based on access patterns, enabling the system to provide efficient path resolution for frequently accessed paths while avoiding the memory overhead of caching the complete repository structure.
4Loss of time
If the session-level cache tracks resource information for path expressions, then path resolution overhead is reduced, but memory management complexity increases
Solution Approach 1:
The session-level cache implements feedback mechanisms by tracking which path expressions are accessed during a session and using this information to optimize subsequent path resolution operations. The cache monitors access patterns and can dynamically adjust its caching strategy based on observed usage, providing feedback that improves path resolution performance for subsequent requests while managing memory resources based on actual session needs.
Data Source
AI summary
A two-level cache to facilitate resolving resource path expressions for a hierarchy of resources is described, which includes a system-wide shared cache and a session-level cache. The shared cache is organized as a hierarchy of hash tables that mirrors the structure of a repository hierarchy. A particular hash table in a shared cache includes information for the child resources of a particular resource. A database management system that manages a shared cache may control the amount of memory used by the cache by implementing a replacement policy for the cache based on one or more characteristics of the resources in the repository. The session-level cache is a single level cache in which information for target resources of resolved path expressions may be tracked. In the session-level cache, the resource information is associated with the entire path expression of the associated resource.


