Cache Access Mechanism for Object-Relational Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing object-relational mapping systems incur unnecessary network traffic and communication overhead due to the replication of data changes across cache clusters, especially when transactions are rolled back or when data is accessed without transactions, leading to inefficient cache access mechanisms.
Innovation Solution
Implementing a deferred replication strategy where changes are replicated only upon successful transaction commit, and using invalidation messages to notify caches of stale data, reducing network traffic by minimizing unnecessary replication and optimizing message efficiency through synchronous or asynchronous methods.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data changes are replicated across cache clusters upon every access, then data consistency is maintained, but network traffic and communication overhead increase significantly
Solution Approach 1:
The system performs preliminary actions by sending invalidation messages to cache clusters before actual data replication occurs. This allows receiving caches to proactively invalidate their local copies, ensuring data consistency is maintained while avoiding unnecessary network traffic for full data replication in every access scenario.
Solution Approach 2:
The invention extracts only the essential invalidation notification from the full data replication process. Instead of replicating entire data entries on every access, the system sends minimal invalidation messages that trigger selective updates only when necessary, significantly reducing network traffic while maintaining consistency.
2Reliability
If invalidation messages are sent for every data access, then cache consistency is ensured, but communication overhead increases
Solution Approach 1:
The system changes the parameter of message transmission by implementing asynchronous invalidation messages instead of synchronous ones. This allows invalidation notifications to be sent without blocking the primary data access operation, reducing communication overhead while still ensuring cache consistency is eventually maintained.
Solution Approach 2:
The invention applies partial action by sending invalidation messages selectively rather than for every single data access. The system determines when invalidation is actually necessary based on the access pattern and data state, avoiding excessive communication while maintaining sufficient cache consistency for correct operation.
3Speed
If data is replicated in local cache for every access, then access speed improves, but unnecessary network traffic is generated
Solution Approach 1:
The system implements self-service by allowing local caches to serve data access requests directly from their local copies without requiring network communication. Invalidation messages are sent asynchronously to notify caches of changes, but the actual data retrieval operates independently and efficiently from local storage, improving access speed while minimizing network traffic.
Data Source
AI summary
Techniques for improving cache accesses in an object-relational mapping space are described herein. In one embodiment, in response to a first cache request received at a first cache API associated with a transaction for updating a data entry of the relational database, the updated data of the data entry is stored in a local cache, where the local cache is one of members of a cache cluster, and an invalidation message is sent to remaining members of the cache cluster to invalidate corresponding cache entries of the remaining members. In response to a second cache request received at a second cache API associated with a transaction for loading data from a data entry of the relational database, the loaded data is stored in the local cache without sending an invalidation message to the remaining members of the cache cluster. Other methods and apparatuses are also described.


