Distributed System Replay via Simulation Objects and Memory-Mapped Files

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging distributed systems is challenging due to the complexity of interactions among numerous nodes, leading to difficulties in analyzing and diagnosing bugs, as existing replay technologies consume resources, introduce overhead, and limit scalability.

Innovation Solution

Simulating distributed systems using a single simulation process with multiple simulation objects and memory-mapped files, where messages are simulated as function calls and instance states are managed through memory-mapped files, reducing resource consumption and disk swapping.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple separate processes are used to simulate each instance, then each instance can be simulated independently, but resource consumption increases and scalability is limited

Engineering Contradiction:
Improvesimulation accuracyVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

Multiple simulation instances are merged into a single simulation process, where each instance is represented by a simulation object within the same process. This eliminates the need for separate process contexts while maintaining independent simulation of each instance, thereby reducing resource consumption and improving scalability without sacrificing simulation accuracy.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

A single simulation process is designed to handle multiple simulation instances through simulation objects, making the process universal and multi-functional. This allows the same process to simulate different distributed system instances by switching between memory-mapped data files, eliminating redundancy and improving resource efficiency.

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

2Adaptability or versatility

If inter-process communication is used to simulate messages between instances, then communication between instances can be modeled, but operating system calls introduce overhead and reduce performance

Engineering Contradiction:
Improvecommunication modelingVSAvoidsimulation performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

Message passing between simulation instances is merged into internal function calls within the single simulation process. Instead of using inter-process communication mechanisms that require operating system calls, the simulation objects communicate through direct function calls, eliminating OS call overhead while preserving the ability to model communication patterns between distributed instances.

Inventive Principle:
Principle #5Merging (Combining)

3Reliability

If each instance has its own process context, then instance independence is maintained, but code is redundantly duplicated and scalability is limited

Engineering Contradiction:
Improveinstance independenceVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The simulation process is segmented into independent simulation objects, each representing a distributed system instance. This segmentation maintains instance independence and allows switching between instances through memory-mapped data files, while avoiding the need for separate process contexts and redundant code duplication. The system complexity is reduced by consolidating instance management within a single process.

Inventive Principle:
Principle #1Segmentation

4Difficulty of detecting and measuring

If trace logs are replayed using traditional replay technology, then bug detection can be performed, but resource consumption increases and disk swapping occurs

Engineering Contradiction:
Improvebug detection capabilityVSAvoidresource consumption
Core Design Contradiction:
Difficulty of detecting and measuringVSLoss of energy

Solution Approach 1:

Instance state data from trace logs is copied into memory-mapped data files that can be efficiently switched between simulation instances. This copying approach allows the simulation process to load only the necessary data into memory space, reducing disk swapping and resource consumption while maintaining the ability to replay and analyze trace logs for bug detection.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS7925487B2Replaying distributed systems
Publication Date: 2011.04.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7925487B2 patent drawing
  • US7925487B2 patent drawing
  • US7925487B2 patent drawing

AI summary

Replaying distributed systems involves playing a distributed system in a simulator using data from a real-world operation. In an example embodiment, a simulation process is to simulate a distributed system that has a first instance and a second instance. The simulation process includes a first simulation object corresponding to the first instance and a second simulation object corresponding to the second instance. In another example embodiment, communications between the first instance and the second instance are simulated within the simulation process using function calls between the first simulation object and the second simulation object.