Web Service Transaction Manager for Stateless API State Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Web service APIs are typically stateless, making it difficult for client software to manage multiple units of work as part of a single logical database transaction, as they lack the ability to commit or roll back changes depending on client-determined final status, especially in web service messaging environments.
Innovation Solution
A transaction manager hosted by a server creates a new database transaction upon receiving a client request and associates subsequent web service calls with it, allowing for committing or rolling back data, and automatically terminating the transaction if no action is taken within a predefined time frame.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If web service APIs are designed to be stateless for simplicity and scalability, then ease of operation and server scalability are improved, but the ability to manage transactions across multiple invocations and maintain client session state deteriorates
Solution Approach 1:
The patent introduces a transaction manager as an intermediary component that maintains session state and transaction information on the server side. This mediator binds database connections to thread identifiers, allowing the server to track and manage transactions across multiple stateless web service invocations without requiring the client to maintain session state, thus resolving the contradiction between stateless simplicity and transactional capability
Solution Approach 2:
The patent segments the transaction management functionality by separating it into distinct components: the stateless web service layer handles simple requests, while the transaction manager handles complex transaction coordination. This segmentation allows the web service APIs to remain simple and scalable while the transaction manager provides the necessary state management capabilities for multi-invocation transactions
2Productivity
If multiple database operations are performed across separate web service calls, then productivity and service modularity are improved, but transaction reliability deteriorates because client software cannot commit or rollback changes
Solution Approach 1:
The patent implements a feedback mechanism where the transaction manager monitors and tracks the status of database operations across multiple web service calls. By maintaining transaction state information on the server side and using thread identifiers to bind operations together, the system provides feedback about transaction status, enabling reliable commit or rollback decisions to be made based on the final client-determined status
Solution Approach 2:
The patent performs preliminary actions by establishing transaction boundaries and binding database connections to thread identifiers before multiple web service operations are executed. This preliminary setup ensures that all subsequent operations within the same thread are automatically associated with the same transaction, enabling atomic commit or rollback across distributed service calls without requiring client-side transaction management
Data Source
AI summary
A method and apparatus for managing database transactions in a web service messaging environment. In one embodiment, the method includes receiving a web service call indicating a beginning of a database transaction from a client, and creating a database transaction in response to this web service call. The method further includes receiving subsequent web service calls from the client, and for each subsequent web service call, associating a corresponding web service call with the database transaction, and performing the corresponding web service call. Afterwards, the database transaction is terminated upon committing or rolling back data resulting from the subsequent web service calls.


