Robust Transaction Communication via UUID State Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Transactional data processing systems face reliability issues in communication between clients and servers, leading to potential duplicate transactions due to temporary losses in communication, especially with mobile devices, where clients may resend orders or transactions without confirmation.
Innovation Solution
A method for robust communication between clients and servers involves generating a transaction UUID, sending a transaction request, waiting for confirmation, and ensuring only one transaction is executed by using timeouts and UUIDs to manage transaction states, preventing multiple executions and ensuring both parties are informed of the transaction outcome.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the client resends a transaction request after a communication loss, then the transaction can be completed, but duplicate transactions may occur
Solution Approach 1:
The system performs preliminary actions by assigning a unique transaction identifier (UUID) to each transaction request before execution. This UUID is embedded in the request and used by the server to detect and prevent duplicate transactions, allowing the client to safely resend requests after communication losses without causing duplicates.
Solution Approach 2:
The server provides feedback by processing the transaction request and returning a result to the client. The server uses the UUID to determine whether the transaction is new or a duplicate, and communicates this outcome to the client, enabling the client to understand whether resending was necessary and to maintain consistent transaction state.
2Object-generated harmful factors
If the client waits for server confirmation, then duplicate transactions are prevented, but communication time increases
Solution Approach 1:
The client performs self-service by locally tracking the state of outstanding transactions using the UUID. Instead of requiring continuous server confirmation for every aspect of transaction processing, the client autonomously manages its understanding of transaction state, reducing unnecessary communication rounds and time delays.
3Stability of the object's composition
If timeout periods are used to detect lost communications, then transaction state consistency is maintained, but processing time increases
Solution Approach 1:
The system changes the parameter of timeout duration based on transaction characteristics and communication conditions. By adjusting timeout values dynamically, the system balances the need to detect lost communications (for state consistency) against the need to minimize waiting time, allowing faster processing for reliable connections while maintaining consistency for unstable connections.
Data Source
AI summary
A method for robust communication between a client (1) and a server (2), for performing a transaction, comprises the steps of the client (1) initiating, through a transaction request (21), a transaction to be performed by the server computer (2), waiting (13) for a transaction confirmation request (22) from the server computer (2), and when receiving the response, sending a transaction confirmation response (23). After sending the transaction confirmation response (23), the client device (1) is not free to abort the transaction but is forced to wait for and accept a transaction result message (24) from the server computer (2), or, in the case of a server-side failure, a server-side transaction abort message (25).

