Aspect-Oriented Asynchronous Caching for Stateful Applications

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for making stateful software applications cache-aware require manual insertion of caching commands, which can lead to code readability issues, increased failure points, and difficulties in modifying third-party code, resulting in inaccurate or missing stateful information storage.

Innovation Solution

An automated caching tool using aspect-oriented programming (AOP) executes an asynchronous caching function without modifying the original source code, allowing for efficient storage of stateful information across multiple locations in the code, including inaccessible sections, and reduces latency by executing caching functions in parallel to the application.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual caching commands are inserted into the code, then the software application becomes cache-aware and can store stateful information, but code readability deteriorates and the number of failure points increases

Engineering Contradiction:
Improvestateful information storage accuracyVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the caching logic from the original source code by using aspect-oriented programming. The caching functionality is separated into independent aspect classes that can be applied to specific join points without modifying the original code structure. This allows the software to become cache-aware while maintaining code readability and reducing complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary mechanism (aspect-oriented programming framework) between the source code and the caching functionality. The aspect classes act as intermediaries that intercept method calls and automatically execute caching operations without requiring manual insertion of caching commands in the original code.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If manual caching commands are inserted into third-party code, then caching functionality can be added, but the difficulty of modifying the code increases and accessibility to certain sections may be restricted

Engineering Contradiction:
Improvecaching capabilityVSAvoidcode modification ease
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent extracts caching functionality from the requirement to manually modify third-party code. By using aspect-oriented programming, the caching logic is pulled out into separate aspect classes that can be applied to third-party code without actually modifying it. This maintains adaptability while preserving ease of manufacture.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of modifying the original third-party code to add caching functionality, the patent inverts the approach by having the aspect classes modify the behavior of the third-party code from the outside. The aspects are applied to join points in the third-party code without changing the original source, making the process easier and more versatile.

Inventive Principle:
Principle #13The other way round (Inversion)

3Reliability

If synchronous caching is implemented, then stateful information can be stored, but the application experiences increased latency due to sequential execution

Engineering Contradiction:
Improvestateful information storageVSAvoidapplication latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements asynchronous caching where caching operations are performed periodically or in the background after the main application flow completes. The aspect classes execute caching operations asynchronously, allowing the application to continue without waiting for caching to complete, thus reducing latency while maintaining reliable stateful information storage.

Inventive Principle:
Principle #19Periodic action

4Reliability

If caching commands are manually inserted at every relevant location, then comprehensive caching coverage is achieved, but the time and effort required for implementation increases significantly

Engineering Contradiction:
Improvecaching coverageVSAvoidimplementation speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates universal aspect classes that can be applied to multiple locations in the codebase simultaneously. A single aspect class can handle caching for multiple methods or classes, providing comprehensive caching coverage without requiring separate manual insertion at every location. This dramatically increases implementation speed while maintaining reliability.

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

Data Source

PatentUS20240354090A1Asynchronous Caching for Stateful Applications
Publication Date: 2024.10.24 RED HAT INC
  • US20240354090A1 patent drawing
  • US20240354090A1 patent drawing
  • US20240354090A1 patent drawing

AI summary

Automatic caching for stateful applications can be implemented using aspect-oriented programming. In one example, a caching tool can detect, based on a selection from a client device, an update to a property of an instance of a software application. The caching tool can further identify a match between the update to the property and a predefined aspect. In response to the identifying the match, the caching tool may determine stateful information for the instance based on the selection from the client device. In response to determining the stateful information, the caching tool may automatically execute an asynchronous caching function to store, in a cache, the stateful information.