In-Memory Test Copy 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 accurate execution states, which may be overwritten in production databases, and the cost and scalability issues of maintaining full-scale test databases.

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 impacting production data, and uses mocked execution states to support concurrent test runs, enabling consistent replay of requests.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If production database is used for replay testing, then execution state is available, but production data is overwritten and live execution state is impacted

Engineering Contradiction:
Improveexecution state availabilityVSAvoidproduction data corruption
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent creates a copy of the execution state from the production database into a test database before replay testing. This copy contains the necessary state information (e.g., cart contents, browsing history, order details) without affecting the original production data. The test database serves as an isolated environment where replay tests can be performed safely.

Inventive Principle:
Principle #26Copying

2Reliability

If full-scale test database is maintained for testing, then replay testing can be performed, but cost increases significantly

Engineering Contradiction:
Improvereplay testing capabilityVSAvoidtesting resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the necessary execution state data from the production database into a separate test database, rather than maintaining a full-scale copy of the entire production environment. This selective extraction includes only the state information required for replay testing (such as customer cart data, order history, and browsing information) while excluding unnecessary data, thereby reducing storage costs and resource requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

3Quantity of substance

If single test database is used, then resource usage is reduced, but scalability is limited for concurrent test runs

Engineering Contradiction:
Improvetesting resourcesVSAvoidconcurrent test run capability
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent segments the test database into multiple isolated test databases, each capable of holding execution state for different test scenarios or customers. This segmentation allows multiple replay tests to run concurrently without interfering with each other, as each test can use its own dedicated test database or a specific subset of the segmented databases.

Inventive Principle:
Principle #1Segmentation

4Object-affected harmful factors

If execution state is copied to test database, then production data is protected, but system complexity increases

Engineering Contradiction:
Improveproduction data protectionVSAvoiddata management complexity
Core Design Contradiction:
Object-affected harmful factorsVSDevice complexity

Solution Approach 1:

The patent performs the execution state copy operation as a preliminary action before replay testing begins. The system automatically captures the current execution state from the production database and stores it in the test database in advance, so that when replay testing is initiated, the necessary state data is already available. This eliminates the need for complex real-time data synchronization mechanisms during testing.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11775417B1Sharing execution states among storage nodes during testing of stateful software
Publication Date: 2023.10.03 AMAZON TECH INC
  • US11775417B1 patent drawing
  • US11775417B1 patent drawing
  • US11775417B1 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.