Execution Context Extension in Continuation Runtimes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Continuation based runtimes lack efficient mechanisms to provide and manage execution properties within their execution contexts, limiting the flexibility and functionality of activities and their child activities.

Innovation Solution

A computer system instantiates a parent activity with child activities that can add execution properties to the execution context, and implements a thread-local store (TLS) interface for setup and cleanup, enabling the management of execution properties during activity execution, including setup before pulse of work and cleanup after execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If continuation based runtime uses standard thread-local storage for execution context, then thread identity and basic properties are maintained, but execution properties cannot be extended or customized for activities

Engineering Contradiction:
Improveexecution context extensibilityVSAvoidexecution context structure
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The execution context is segmented into two distinct parts: the base execution context (inheriting from ThreadLocalExecutionContext) that handles standard thread properties, and an extended execution context (through IExecutionProperty implementation) that provides customized execution properties for activities. This segmentation allows independent management of standard and extended properties without interfering with each other.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The IExecutionProperty interface acts as an intermediary layer between the base execution context and the activity execution. It provides a standardized mechanism for adding, accessing, and managing extended execution properties without requiring changes to the underlying thread-local storage infrastructure.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If execution properties are added to extend activity functionality, then activity flexibility increases, but context management complexity increases

Engineering Contradiction:
Improveactivity functionalityVSAvoidcontext management
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The execution property mechanism is designed to be self-managing through automatic registration and retrieval. Activities can access execution properties through the standardized IExecutionProperty interface without manual context manipulation, and the runtime automatically handles the lifecycle of execution properties during activity execution.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The IExecutionProperty interface provides a universal mechanism that can accommodate any type of execution property needed by activities. The same interface structure handles diverse property types uniformly, simplifying management while enabling extensive functionality extension across different activity scenarios.

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

3Adaptability or versatility

If activities are paused and resumed in different processes or threads, then runtime flexibility improves, but execution context consistency becomes difficult to maintain

Engineering Contradiction:
Improveprocess and thread flexibilityVSAvoidexecution context consistency
Core Design Contradiction:
Adaptability or versatilityVSStability of the object's composition

Solution Approach 1:

When activities are persisted to storage and later rehydrated, the execution context is copied and reconstructed in the new process or thread. The IExecutionProperty interface ensures that execution properties are properly serialized and restored, maintaining context consistency across process and thread boundaries through structured copying rather than direct sharing.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8683432B2Providing execution context in continuation based runtimes
Publication Date: 2014.03.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8683432B2 patent drawing
  • US8683432B2 patent drawing
  • US8683432B2 patent drawing

AI summary

In an embodiment, a computer system instantiates a parent activity configured for execution in a continuation based runtime. The parent activity includes various child activities configured to perform pulses of work. The parent activity is also configured to add execution properties to an execution context. The computer system adds execution properties to the parent activity's execution context to generate a modified execution context which includes execution properties that extend the functionality of the parent and child activities. The added execution properties include corresponding identifiers that identify the added execution properties. The computer system also executes the parent activity including the various child activities within the modified execution context in the continuation based runtime. The modified execution context includes the added execution properties that are available to the parent and any child activities during execution, where at least one child activity implements functionality provided by the added execution properties.