Stateful Environment for Stateless Web Services

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Stateless environments lack mechanisms to maintain state information, leading to inefficiencies such as multiple login processes and increased network traffic, as each request is independent and state information is not preserved between sessions.

Innovation Solution

Establishing a stateful environment by using a combination of stateless and stateful threads on a server, with transient and persistent objects to store and accumulate temporary information, allowing communication between threads to maintain state information across sessions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a database is connected to the server computer to store state information, then state information can be maintained between sessions, but the system complexity and network traffic increase

Engineering Contradiction:
Improvestate information maintenanceVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the server into distinct threads: stateless threads that handle incoming requests and a stateful thread that maintains state information. This segmentation allows the system to maintain state information without requiring a complex database connection, as the stateful thread acts as a lightweight in-memory storage mechanism specifically for session state.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a transient object as an intermediary between stateless and stateful threads. This transient object carries state information temporarily during thread communication, enabling state preservation without direct database access. The transient object serves as a mediator that transfers necessary state data between threads with different state characteristics.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If login process is executed for each request in a stateless environment, then each request is independent, but multiple login processes are inefficient and produce extra network traffic

Engineering Contradiction:
Improverequest independenceVSAvoidlogin process efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent performs login authentication in advance during the first request and stores the authenticated state information in the stateful thread. Subsequent requests can then access this pre-established state information without repeating the full login process, thereby improving efficiency while maintaining request independence through the stateful thread's memory of previous authentication.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the authenticated state information and stores it in the stateful thread's memory space. This copied state information is then accessible to subsequent requests without requiring the original login credentials or repeating the authentication process, reducing network traffic and improving productivity.

Inventive Principle:
Principle #26Copying

3Reliability

If state information is stored in a database, then state information is preserved, but access time and processing overhead increase

Engineering Contradiction:
Improvestate information preservationVSAvoidaccess time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent moves state information storage from the traditional database dimension (persistent external storage) to a thread-memory dimension (in-process volatile storage). The stateful thread maintains state information in its memory space, providing faster access times compared to database I/O operations. This dimensional shift from external persistent storage to internal volatile storage resolves the time penalty associated with database access.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS8219609B1Establishing a stateful environment for a stateless environment
Publication Date: 2012.07.10 ORACLE AMERICAN INC
  • US8219609B1 patent drawing
  • US8219609B1 patent drawing
  • US8219609B1 patent drawing

AI summary

Provided is a method and an apparatus for maintaining state information between a stateless environment and a stateful environment. Specifically, a front-end process operates a stateless environment, such as providing web services via the HyperText Transfer Protocol. Because HTTP is inherently stateless, a back-end process operates a stateful environment by managing multiple modules. Some of the modules can be login modules that request login information for an authentication process. The authentication process can be the Java Authentication and Authorization Service (JAAS). The back-end process accumulates state information and transmits the state information to the front-end process when modules request further information. By managing the authentication process from the back-end process, the stateful environment is established for the stateless environment.