Thread-Safe Stub Manager via Key Factory Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional non-thread safe usage of service stubs in web services leads to data corruption when multiple client applications connect to the same service provider, as shared service stubs handle data from multiple threads, rendering it unusable.
Innovation Solution
Implementing a key factory and access manager to instantiate separate stub managers for each thread, ensuring each thread has its own service stub manager and managed entity to handle connections and data securely, preventing data corruption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a single service stub is shared by all threads to connect to the same service provider, then device complexity is reduced and ease of operation is improved, but data corruption occurs and reliability deteriorates
Solution Approach 1:
The patent divides the shared service stub into thread-specific stub managers. Each thread gets its own stub manager instance that independently manages connections to the service provider, preventing data corruption while maintaining ease of use through automated connection management.
Solution Approach 2:
The stub manager acts as an intermediary between threads and the service stub. It provides a thread-safe interface that abstracts the complexity of connection management, allowing multiple threads to access the service provider without direct conflicts.
2Device complexity
If a single service stub is shared by all threads, then device complexity is reduced, but data corruption occurs in input/output buffers
Solution Approach 1:
The patent segments the service stub functionality into separate stub managers for each thread. Each stub manager maintains its own input/output buffers and connection state, eliminating data corruption while keeping the overall system architecture relatively simple.
Solution Approach 2:
Instead of modifying the original service stub to be thread-safe, the patent creates copies (stub managers) for each thread. Each stub manager is a separate instance that replicates the necessary connection functionality without sharing state, preventing buffer corruption.
3Reliability
If separate stub managers are instantiated for each thread, then data corruption is prevented and reliability is improved, but device complexity increases
Solution Approach 1:
The stub manager is designed as a universal class that can be instantiated for any thread connecting to any service provider. It encapsulates multiple functions (connection management, authentication, data exchange) in a single reusable component, reducing complexity despite multiple instances.
Solution Approach 2:
The stub manager autonomously manages its own connection lifecycle, including establishing connections, authenticating, and handling data exchange without external intervention. This self-service capability reduces the need for complex centralized management systems.
Data Source
AI summary
Exemplary methods for performing web service calls include receiving, from a first client application associated with a first thread, a first request to establish a first connection with a first service endpoint providing a first service, the first request including a first connection key. The methods further include in response to the first request, identifying a first stub manager object that corresponds to the first connection key and the first thread, the first stub manager object representing a first instance of a stub manager. The methods further include providing, exclusively to the first client application of the first thread, the first stub manager object, wherein the first client application of the first thread is to use the first stub manager object for communicating with the first service endpoint.


