Asynchronous File Replication via Local Caching and Three-Way Merge
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In client-server architectures, maintaining file integrity and synchronicity across network connections is challenging, especially when connections are lost and locks are lost, leading to uncertainty about file edits made by other clients.
Innovation Solution
Implementing asynchronous replication by caching server files on a client, managing them locally, and merging changes back to the server as needed, without relying on locks, using a sync manager to manage download, base, working, and upload files, and performing three-way merges when conflicts arise.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If locks are used to prevent concurrent editing of server files, then file integrity is maintained, but the system becomes vulnerable to data loss when network connections are lost and locks are lost
Solution Approach 1:
The system performs preliminary actions by creating local copies of server files (download file, base file, working file) before network disconnection occurs. This allows the client to work offline with cached versions while maintaining the ability to synchronize later, preventing data loss without requiring continuous lock maintenance.
Solution Approach 2:
The patent uses multiple local copies of the server file (download file for initial copy, base file for original version, working file for active editing, upload file for changes) to enable offline work and conflict resolution. These copies allow the system to maintain file integrity without relying on continuous network locks.
2Reliability
If continuous network connection is maintained to ensure file synchronicity, then real-time updates are achieved, but the system becomes fragile when connections are lost
Solution Approach 1:
The system dynamically adapts its operation mode based on network availability. When connected, it synchronizes with the server; when disconnected, it continues working with local copies. The synchronization process is dynamic, performing three-way merges only when conflicts are detected during reconnection, making the system both reliable and adaptable.
Solution Approach 2:
The system prepares for potential disconnection by maintaining local cached copies of files before the disconnect occurs. This preliminary caching action enables the system to maintain operability and eventual synchronicity without requiring continuous connection, thus improving both reliability and adaptability.
3Reliability
If locks are placed on server files to prevent concurrent editing, then atomicity is guaranteed, but the complexity of managing locks across network failures increases
Solution Approach 1:
The patent extracts the locking mechanism from the system by using local file copies instead of server-side locks. Each client works with its own local copies (working file, upload file) and only interacts with the server for initial downloads and final uploads. This eliminates the complexity of managing distributed locks while maintaining atomicity through the three-way merge process.
Solution Approach 2:
The local file copies act as intermediaries between the client and server, eliminating the need for direct lock management on the server. The three-way merge process serves as a mediator to resolve conflicts atomically when synchronization occurs, replacing the need for continuous lock maintenance.
4Reliability
If three-way merge is performed to resolve file conflicts, then no user's edits are lost, but the processing time and computational resources increase
Solution Approach 1:
The system performs a three-way merge only when necessary - specifically when conflicts are detected during synchronization after network reconnection. If no conflicts exist (the server file hasn't changed), the system performs a simple update without merging, thus avoiding unnecessary processing time while still preserving edits when needed.
Data Source
AI summary
Contents of a copy of a server file may be saved to a down load file, a base file, and a working file. An indication may be received from an application that the application has edited the working file and a copy of the edited working file may be saved to an upload file. A server computer may be queried to determine if the server file on the server computer has been changed. If the server file on the server computer has not been changed, the server file on the server computer may be updated with contents of the upload file. If the server file on the server computer has been changed, a three-way merge of the upload file, the base file, and the changed server file on the server computer may be performed. Then the server file on the server computer may be updated with the three-way merge results.


