Server-Side Page Cache for Single-Page Application Redundancy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Single-page applications (SPAs) in cloud computing environments face performance issues due to redundant data requests to application servers, leading to higher server-side costs and limited scalability, as existing caching solutions like write-through caching and cache invalidation are complex, expensive, and error-prone, and do not ensure 100% cache consistency across requests.

Innovation Solution

Implementing a cache entry on the application server with a lifetime matching the user's interaction with the single page, eliminating the need for revalidation or invalidation logic by serving redundant data from the cache directly, and allowing for a page-level cache that can be used as a level-1 cache with a revalidation strategy for cache misses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If extensive caching is used on the client system, then server-side costs are reduced, but cache consistency becomes difficult to maintain

Engineering Contradiction:
Improveserver-side costVSAvoidcache consistency
Core Design Contradiction:
Loss of energyVSReliability

Solution Approach 1:

The system pre-generates and caches markup content on the application server before it is needed by the client. This preliminary action allows the cached content to be served directly to the client without requiring complex invalidation logic, thereby reducing server-side costs while maintaining cache consistency through server-controlled caching.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If cache invalidation solutions are added to ensure content freshness, then cache consistency is improved, but code complexity and development cost increase

Engineering Contradiction:
Improvecache consistencyVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system creates a server-side copy of the markup content that is cached and served to the client. This copying approach eliminates the need for complex invalidation logic because the server maintains its own authoritative copy of the content, thereby improving cache consistency without increasing code complexity.

Inventive Principle:
Principle #26Copying

3Reliability

If multiple data requests are made to the application server, then data freshness is ensured, but server performance and scalability are reduced

Engineering Contradiction:
Improvedata freshnessVSAvoidserver performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system pre-generates markup content on the server and caches it before the client requests it. This preliminary action reduces the number of data requests the server must handle, thereby improving server performance and scalability while still ensuring data freshness through server-controlled caching.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates and serves cached copies of markup content to the client, reducing the number of requests the server must process. This copying approach maintains data freshness from the server's perspective while significantly reducing server workload and improving overall productivity.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11556608B2Caching for single page web applications
Publication Date: 2023.01.17 SALESFORCE INC
  • US11556608B2 patent drawing
  • US11556608B2 patent drawing
  • US11556608B2 patent drawing

AI summary

Systems and methods are described for processing of requests of a single page application in an application server. The method includes receiving a request from a component of a single page application from a user device, getting a page identifier (ID) from the request, getting a user ID from the request, and searching a cache lookup table for a cache entry associated with the page ID. When no cache entry for the page ID is found in the cache lookup table, a new cache entry is created in the cache lookup table for processing of the request, and the request is processed using the new cache entry to generate a response. When a cache entry for the page ID is found in the cache lookup table, the user ID from the request is compared to a user ID in the cache entry, and when the user IDs match, the request is processed using the found cache entry to generate the response; and the response is sent to the single page application on the user device.