Predictive Code Pre-loading for On-demand Execution Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In on-demand code execution environments, monitoring and debugging of tasks and their interactions with external services are challenging due to the distributed and asynchronous nature, making it difficult to track and diagnose issues such as infinite loops or complex functionality errors.

Innovation Solution

The implementation of an on-demand code execution environment that passively and actively monitors task executions, generates task profiles, and predicts subsequent calls by pre-loading necessary code and optimizing virtual machine selection based on communication paths, enabling efficient handling and visualization of task interactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Difficulty of detecting and measuring

If passive and active monitoring of task executions is implemented, then debugging capability is improved, but system overhead increases

Engineering Contradiction:
Improvedebugging capabilityVSAvoidsystem overhead
Core Design Contradiction:
Difficulty of detecting and measuringVSUse of energy by moving object

Solution Approach 1:

The system performs preliminary actions by pre-loading code for predicted subsequent tasks before they are actually executed. This allows the monitoring and debugging infrastructure to be prepared in advance, reducing the overhead during actual task execution while maintaining comprehensive debugging capabilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses passive monitoring where tasks monitor themselves and report their execution state, reducing the need for external active monitoring infrastructure. This self-service approach minimizes system overhead while still providing comprehensive debugging information.

Inventive Principle:
Principle #25Self-service

2Loss of time

If code is pre-loaded for predicted subsequent tasks, then execution latency is reduced, but memory usage increases

Engineering Contradiction:
Improveexecution latencyVSAvoidmemory usage
Core Design Contradiction:
Loss of timeVSQuantity of substance

Solution Approach 1:

The system applies partial pre-loading by only loading code for tasks that are predicted to be executed next, rather than pre-loading all possible tasks. This selective approach reduces memory usage while still achieving latency reduction for the most critical subsequent tasks.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The pre-loading strategy is dynamic and adapts based on prediction accuracy and current system state. The system adjusts which tasks to pre-load and when to evict cached code based on memory pressure and observed execution patterns, optimizing the balance between latency and memory usage.

Inventive Principle:
Principle #15Dynamics

3Productivity

If virtual machine selection is optimized based on communication paths, then task execution efficiency is improved, but system complexity increases

Engineering Contradiction:
Improvetask execution efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system uses feedback from observed communication patterns between tasks to dynamically optimize virtual machine selection. By monitoring which tasks communicate frequently and placing them on the same or nearby virtual machines, the system improves execution efficiency without requiring complex manual configuration.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The virtual machine selection optimization is performed automatically by the system based on observed communication patterns, without requiring manual intervention or complex external orchestration. The system self-optimizes its own task placement to improve execution efficiency.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9811363B1Predictive management of on-demand code execution
Publication Date: 2017.11.07 AMAZON TECH INC
  • US9811363B1 patent drawing
  • US9811363B1 patent drawing
  • US9811363B1 patent drawing

AI summary

Systems and methods are described for predictively managing calls to tasks on an on-demand code execution environment. Specifically, a task profile can be utilized to predict that a call to a first task will be followed by a call to a second task. Thereafter, a virtual machine can be loaded with executable code corresponding the second task, even before the call to the second task is received. If the call to the second task is received, the task can then be executed by utilizing the previously loaded executable code, thus increasing the speed at which the second task can be executed on the on-demand code execution environment.