In-Memory State Copying for Stateful Service Replay Testing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Replay testing for stateful cloud-based services is challenging due to the need for maintaining execution state and the impact on live data, with existing solutions being costly and not scalable for large test runs.

Innovation Solution

A service testing system that creates an in-memory test copy of the execution state for stateful requests, allowing the compute engine to execute requests without affecting production data, and uses mocked execution states to support concurrent test runs, enabling consistent replay of stateful requests.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a full-scale test database is maintained for testing purposes, then replay testing of stateful services can be performed, but the cost increases and scalability is reduced

Engineering Contradiction:
Improvereplay testing capabilityVSAvoidtest database resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent creates in-memory copies of execution state data from the production database without maintaining a separate full-scale test database. These temporary in-memory copies are used solely for replay testing purposes and then discarded, eliminating the need for costly persistent test databases while enabling comprehensive replay testing of stateful services

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent uses temporary in-memory execution state copies that exist only during the test run and are automatically discarded afterward. These disposable in-memory objects replace expensive persistent test databases, providing the same replay testing functionality at minimal cost and with full scalability for concurrent test runs

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Measurement precision

If production data is used for replay testing, then accurate reproduction of execution state is achieved, but live execution state data is impacted

Engineering Contradiction:
Improveexecution state reproduction accuracyVSAvoidimpact on production data
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

Solution Approach 1:

The patent introduces in-memory execution state copies as an intermediary between the production database and the replay testing process. These intermediaries contain replicated execution state data that can be freely modified during testing without affecting the original production data, thus maintaining both accuracy and data integrity

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates precise copies of production execution state data in memory for testing purposes. These copies are exact replicas that enable accurate replay testing while being completely isolated from the production database, preventing any harmful impacts on live data

Inventive Principle:
Principle #26Copying

3Productivity

If a single test database is used, then resource utilization is improved, but the system cannot handle large numbers of concurrent test runs with conflicting execution state data

Engineering Contradiction:
Improveresource utilization efficiencyVSAvoidconcurrent test run capacity
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the test execution environment by creating separate in-memory execution state copies for each concurrent test run. This segmentation allows multiple tests to execute simultaneously with isolated state data, eliminating conflicts while maintaining efficient resource utilization through in-memory storage

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11360880B1Consistent replay of stateful requests during software testing
Publication Date: 2022.06.14 AMAZON TECH INC
  • US11360880B1 patent drawing
  • US11360880B1 patent drawing
  • US11360880B1 patent drawing

AI summary

A service testing system is disclosed to enable consistent replay of stateful requests on a service whose output depends on the service's execution state prior to the requests. In embodiments, the service implements a compute engine that executes service requests and a storage subsystem that maintains execution states during the execution of stateful requests. When a stateful request is received during testing, the storage subsystem creates an in-memory test copy of the execution state to support execution of the request, and provides the test copy to the compute engine. In embodiments, the storage subsystem will create a separate instance of execution state for each individual test run. The disclosed techniques enable mock execution states to be easily created for testing of stateful requests, in a manner that is transparent to the compute engine and does not impact production execution data maintained by the service.