Stateless Application Framework for Distributed Workflow State Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Stateless applications in distributed environments face inefficiencies due to the need for storing state and context data, which increases resource usage and can lead to inconsistencies when handling long-running tasks across multiple instances.

Innovation Solution

A stateless application framework that utilizes a stateless application module, a context database, and a messaging queue to manage state data persistently and ensure consistency through versioning, allowing instances to be terminated without losing state information and ensuring that tasks are performed based on the current state.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If state machines are used to keep track of states and contexts across different sessions, then session state management is achieved, but computer resources (memory and processing) increase significantly

Engineering Contradiction:
Improvesession state managementVSAvoidcomputer resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts the state storage function from the application instance memory and places it in an external database. The state machine logic remains in the application, but the actual state data is stored externally, allowing the application to be stateless regarding persistent data while maintaining full state management capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a database as an intermediary between the application instance and the state data. The database acts as a mediator that stores and retrieves state information, allowing multiple application instances to access and update state data without requiring the state to reside in memory of any single instance.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If state data is kept in memory during idle sessions, then quick access is enabled, but resource efficiency decreases

Engineering Contradiction:
Improvestate access speedVSAvoidresource efficiency
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent implements periodic or on-demand retrieval of state data from the database rather than continuously holding it in memory. Application instances retrieve state data only when needed for processing, and can be terminated when idle, with the state safely persisted in the database for future retrieval.

Inventive Principle:
Principle #19Periodic action

3Productivity

If multiple instances are used to handle increased requests, then processing capacity increases, but state consistency becomes difficult to maintain

Engineering Contradiction:
Improveprocessing capacityVSAvoidstate consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the state management function into two independent parts: the state machine logic (which processes events and determines state transitions) and the actual state data (which is stored in the database). This allows multiple application instances to independently execute state machine logic while all instances read and write to the same centralized database, ensuring consistency across the distributed system.

Inventive Principle:
Principle #1Segmentation

4Adaptability or versatility

If external data processing components are used in the workflow, then processing flexibility increases, but session completion time extends

Engineering Contradiction:
Improveprocessing flexibilityVSAvoidsession completion time
Core Design Contradiction:
Adaptability or versatilityVSDuration of action of moving object

Solution Approach 1:

The patent prepares and persists the complete state context in the database before external processing begins. When external data processing components are invoked, the application can retrieve the pre-prepared state from the database, process data asynchronously, and later resume or complete the workflow by retrieving the persisted state, rather than requiring the application instance to remain active throughout the entire external processing duration.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10732990B2Systems and methods for providing services in a stateless application framework
Publication Date: 2020.08.04 PAYPAL INC
  • US10732990B2 patent drawing
  • US10732990B2 patent drawing
  • US10732990B2 patent drawing

AI summary

Methods and systems for providing a stateless application framework are presented. The stateless application framework is utilized by different applications for implementing different workflows. Each workflow may be associated with one or more state machine configurations representing the different states within the workflow. Upon receiving an indication of an event from an application, a stateless application module transmits a job request to a data processing engine based on a current state of the event. When a response is received from the data processing engine, the state application module determines whether the state of the event has been updated since transmitting the job request. If it is determined that the state has been updated, the stateless application module is configured to transmit another job request to the data processing engine based on the updated state of the event.