Lightweight Enqueue Session Management for Stateless Scalability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Stateless business applications face challenges in managing exclusive locks across interaction steps due to the limitations of stateless programming models, which restrict scalability and lead to potential data inconsistencies and user dissatisfaction.

Innovation Solution

Implementing a light-weight enqueue session management system that decouples lock lifecycle from the application server, using WebSocket connections or timeouts, or a hybrid approach to manage enqueue locks independently, allowing locks to be maintained across interaction steps without the need for heavy-weight session objects.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If stateless programming paradigm is used to eliminate heavy-weight application states, then scalability is improved, but the ability to hold exclusive locks across multiple interaction steps deteriorates

Engineering Contradiction:
ImprovescalabilityVSAvoidlock management capability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system segments the lock management functionality from the application server by introducing a separate enqueue server. The application server handles stateless request processing while the enqueue server independently manages lock lifecycle, allowing locks to persist across multiple interaction steps without requiring stateful application servers.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The enqueue server acts as an intermediary between the application server and the locking mechanism. It receives lock requests from the stateless application server, manages the lock lifecycle independently, and returns lock status information, thereby enabling lock management without requiring heavy-weight session objects on the application server.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If traditional ABAP session-based locking is used, then lock management is simplified, but resource consumption and system complexity increase

Engineering Contradiction:
Improvelock management simplicityVSAvoidsession object overhead
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The lock management functionality is extracted from the ABAP session objects and placed in a separate enqueue server. This extraction eliminates the dependency between session objects and lock management, allowing locks to be managed independently without requiring heavy-weight session objects to be stored on the application server.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system uses lightweight enqueue session identifiers that reference locks on the enqueue server, rather than maintaining full session objects. This copying approach allows the application server to work with simple identifiers while the actual lock management is handled by the enqueue server, reducing memory consumption and system complexity.

Inventive Principle:
Principle #26Copying

3Extent of automation

If locks are tied to ABAP sessions, then lock lifecycle management is automated, but stateless application compatibility is reduced

Engineering Contradiction:
Improvelock lifecycle automationVSAvoidstateless application compatibility
Core Design Contradiction:
Extent of automationVSAdaptability or versatility

Solution Approach 1:

The system dynamically adapts to different application types by providing a unified enqueue session interface. For stateless applications, locks are managed through the enqueue server with automatic lifecycle management via timeouts or WebSocket connections. For stateful applications, the same interface works with traditional session-based locking, making the system versatile across different programming paradigms.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The enqueue server provides a universal lock management interface that works with both stateless and stateful applications. It handles lock requests from any application type, managing lock lifecycle automatically through configurable mechanisms (timeouts for stateless, session-based for stateful), thereby achieving both automation and versatility.

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

4Ease of operation

If heavy-weight session objects are stored on application server, then lock state management is simplified, but scalability and resource efficiency deteriorate

Engineering Contradiction:
Improvelock state managementVSAvoidserver resource consumption
Core Design Contradiction:
Ease of operationVSUse of energy by moving object

Solution Approach 1:

The system replaces heavy-weight persistent session objects with lightweight, short-lived enqueue session identifiers. These identifiers are inexpensive to create and store, and can be discarded after use. The actual lock state is maintained on the enqueue server, not on the application server, reducing memory consumption and improving resource efficiency while maintaining simplified lock state management.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS9672494B2Light-weight lifecycle management of enqueue locks
Publication Date: 2017.06.06 SAP SE
  • US9672494B2 patent drawing
  • US9672494B2 patent drawing
  • US9672494B2 patent drawing

AI summary

In an example embodiment, a request for an enqueue lock for a first piece of data is received from a client application. At an enqueue server separate from an application server instance, a light-weight enqueue session is then created, including generating a light-weight enqueue session identification for the light-weight enqueue session. An enqueue lock for the first piece of data is stored in the light-weight enqueue session. The light-weight enqueue session identification is then sent to the client application. In response to a detection that a session between the client application and the application server instance has been terminated, all enqueue locks in the light-weight enqueue session are deleted and the light-weight enqueue session is deleted.