User Context Management in Tuxedo Server Threads
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In service-oriented architectures, user-created threads lack valid contexts, leading to errors and difficulties in managing transactions, as existing systems only provide system contexts, making it challenging for user threads to operate safely and efficiently.
Innovation Solution
Introducing new APIs such as tpappthrinit and tpappthrterm to create and terminate user contexts, allowing user threads to operate independently with their own contexts, thereby enabling safe execution of Tuxedo ATMI calls and improving thread management in Tuxedo servers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If user threads are created in service-oriented architecture, then thread functionality is improved, but context validity deteriorates (user threads lack valid contexts)
Solution Approach 1:
The system segments context management by creating separate user context structures for each user thread, distinct from system contexts. This allows user threads to have their own isolated context spaces that are valid and manageable independently, resolving the issue of context validity while maintaining thread functionality.
Solution Approach 2:
The invention introduces an intermediary context creation mechanism that bridges user threads and the Tuxedo ATMI system. By creating valid user contexts as an intermediary layer, user threads can safely execute Tuxedo calls without directly accessing system contexts, thus maintaining both thread functionality and context validity.
2Ease of operation
If user contexts are created for each user thread, then thread independence is improved, but system complexity increases
Solution Approach 1:
The context creation mechanism is designed as a universal interface that handles both system contexts and user contexts through the same API framework (tpappthrinit and tpappthrterm). This multi-functional approach allows the system to manage different context types uniformly, reducing operational complexity despite increased thread independence.
Solution Approach 2:
User threads automatically receive their own contexts through the tpappthrinit function, which creates contexts on-demand without requiring manual system configuration. The contexts are self-managed and automatically terminated via tpappthrterm, reducing the burden on system administrators and simplifying operations.
3Reliability
If user threads execute Tuxedo ATMI calls with their own contexts, then execution safety is improved, but resource consumption increases
Solution Approach 1:
The system creates user contexts in advance when user threads are initiated, using the tpappthrinit function. This preliminary context creation ensures that valid contexts are ready before Tuxedo ATMI calls are executed, improving execution safety by preventing context-related errors while allowing efficient resource management through planned allocation.
Solution Approach 2:
User contexts are automatically discarded when user threads terminate through the tpappthrterm function. This automatic recovery mechanism releases memory resources back to the system, ensuring that resource consumption is proportional to active thread count and preventing memory leaks, thus balancing execution safety with resource efficiency.
Data Source
AI summary
According to an embodiment, the present invention provides a computer-readable storage medium comprising processor executable codes. The computer-readable storage medium includes code for receiving information from a client entity at a server entity over a network. The computer-readable storage medium includes code for providing a server process at the service, the server process including one or more process threads. The computer-readable storage medium includes code for providing a first context associated the one or more process threads. The computer-readable storage medium includes code for receiving a user request from the client entity for a user thread, the user thread being associated with the service process. The computer-readable storage medium includes code for generating the user thread at the server entity.


