Database Compaction Using Time To Live Timestamps

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face inefficiencies and scalability issues when handling time-restricted data records, as they often rely on resource-intensive polling processes or CRON jobs to manage expiration, leading to wasteful use of system resources and challenges with large volumes of data.

Innovation Solution

A system that generates time-restricted data records with a TTL timestamp, using a layered data structure to store records based on their expiration time, and performs compaction to identify and evict expired records to message queues, thereby reducing the need for application monitoring and freeing memory without direct application involvement.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If polling processes or CRON jobs are used to manage time-restricted data records, then expiration tracking can be performed, but system resources like processing power and memory are wasted

Engineering Contradiction:
Improveexpiration trackingVSAvoidsystem resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The database system automatically manages time-restricted data records by integrating TTL checking into its native compaction process. The database serves itself by monitoring expirations and evicting records without external polling or CRON jobs, eliminating the need for separate resource-consuming processes while maintaining reliable expiration tracking.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent combines the expiration monitoring function with the database's existing compaction process. By merging these two operations, the system achieves both data organization through compaction and expiration management through a single integrated mechanism, reducing overall system resource consumption while maintaining both functions effectively.

Inventive Principle:
Principle #5Merging (Combining)

2Reliability

If polling processes or CRON jobs are used to manage time-restricted data records, then expiration tracking can be performed, but scalability is limited when used for a very large number of data records

Engineering Contradiction:
Improveexpiration trackingVSAvoidscalability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The database system automatically manages time-restricted data records by integrating TTL checking into its native compaction process. The database serves itself by monitoring expirations and evicting records without external polling or CRON jobs, eliminating the need for separate resource-consuming processes while maintaining reliable expiration tracking.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary organization of data records by TTL values before compaction. By pre-grouping records with similar expiration times and maintaining metadata about TTL distributions, the database prepares the data structure in advance to efficiently identify and evict expired records during compaction, enabling scalable operation with large numbers of time-restricted records.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If application monitoring is used to track time-restricted data records, then business operations can be performed after time period expires, but the burden on application resources increases

Engineering Contradiction:
Improvebusiness operationsVSAvoidapplication resources
Core Design Contradiction:
Ease of operationVSUse of energy by moving object

Solution Approach 1:

The database system automatically manages time-restricted data records by integrating TTL checking into its native compaction process. The database serves itself by monitoring expirations and evicting records without external polling or CRON jobs, eliminating the need for separate resource-consuming processes while maintaining reliable expiration tracking.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The database acts as an intermediary between the application and time-restricted data records. By handling TTL monitoring and expiration management within the database layer itself, the system relieves the application of this burden while ensuring that business operations can proceed smoothly once records expire, maintaining ease of operation without increasing application resource consumption.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11921683B2Use of time to live value during database compaction
Publication Date: 2024.03.05 PAYPAL INC
  • US11921683B2 patent drawing
  • US11921683B2 patent drawing
  • US11921683B2 patent drawing

AI summary

Techniques are disclosed relating to processing of time-restricted data records. In various embodiments, a computing system receives a request to store a record that includes a timestamp identifying a time to live (TTL) for the record in a database, with the database being organized in a layered data structure. The computing system stores the record in the database in a particular location in the layered data structure, with the particular location being selected based on the TTL timestamp for the record. The timestamp may be used by a compaction process to indicate that the record TTL has expired and the data record may be written to a message queue by an eviction process.