Database Caching via Asynchronous Log-Based Replication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional database caching methods using synchronous replication impose usability restrictions and data availability issues due to granular locking, hindering application performance and scalability.

Innovation Solution

Implementing asynchronous log-based replication to manage database transactions and caching, where a caching engine dynamically routes queries based on table synchronization state using metadata, avoiding locking scenarios and enabling seamless caching and routing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronous replication with granular locking is used to keep cache synchronized with database, then data consistency is improved, but usability restrictions and data availability deteriorate

Engineering Contradiction:
Improvedata consistencyVSAvoidusability restrictions
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent segments the locking mechanism from the replication process. Instead of using granular locking on individual tables or rows during replication, the system divides replication into discrete log-based events that can be processed independently. This allows the cache to be updated in small, manageable units without requiring locks on the entire database or cache structure, thereby maintaining data consistency while reducing usability restrictions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary log table that sits between the database and the cache. Database transactions are first logged to this intermediate log table, which then serves as the source for cache replication. This intermediary layer decouples the database from the cache, allowing the cache to be updated asynchronously without requiring locks on the database tables, thus improving data availability while maintaining consistency through the log-based replication process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If synchronous replication with granular locking is used to keep cache synchronized with database, then data consistency is improved, but scalability and performance deteriorate

Engineering Contradiction:
Improvedata consistencyVSAvoidscalability and performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs preliminary action by logging database transactions to the log table before they are applied to the database tables. This preliminary logging step captures all data changes in a structured format that can be efficiently replicated to the cache later. By separating the logging phase from the replication phase, the system can maintain data consistency without requiring synchronous locking during cache updates, thereby improving scalability and performance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements dynamic replication where the cache synchronization process can adapt to system conditions. The replication manager can dynamically adjust the replication rate, batch size, and timing based on database load, cache state, and system resources. This dynamic approach allows the system to maintain data consistency while optimizing for scalability and performance under varying workloads, avoiding the rigid constraints of synchronous replication.

Inventive Principle:
Principle #15Dynamics

3Productivity

If asynchronous log-based replication is used to improve scalability and performance, then scalability and performance are improved, but implementation complexity increases

Engineering Contradiction:
Improvescalability and performanceVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a universal log table structure that can serve multiple functions: it acts as a transaction log, a replication source, and a synchronization checkpoint mechanism. The same log table infrastructure supports both synchronous and asynchronous replication modes, as well as providing audit trails and rollback capabilities. This multi-functionality reduces implementation complexity by consolidating what could be separate complex systems into a single unified log-based approach.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent uses copying by creating a replicated version of the database table structure in the cache based on the log entries. Rather than implementing complex real-time synchronization protocols, the system simply copies data from the database through the log mechanism to the cache. This copying approach, combined with the structured log format, simplifies the implementation of asynchronous replication while maintaining scalability and performance benefits.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8712961B2Database caching utilizing asynchronous log-based replication
Publication Date: 2014.04.29 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8712961B2 patent drawing
  • US8712961B2 patent drawing
  • US8712961B2 patent drawing

AI summary

A database table within a database to persist within a cache as a cached table can be identified. The database can be a relational database management system (RDBMS) or an object oriented database management system (OODBMS). The cache can be a database cache. Database transactions within can be logged within a log table and the cached table within the cache can be flagged as not cached during runtime. An asynchronous replication of the database table to the cached table can be performed. The replication can execute the database transactions within the log table upon the cached table. The cached table can be flagged as cached when the replication is completed.