Database Synchronizer Using HTTP Polling for Real-Time Document Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing document synchronization systems face challenges in maintaining real-time collaboration and data consistency across geographically distributed users, particularly when changes are made to a database-stored document, as they often rely on inefficient polling methods and lack effective mechanisms for propagating changes to all users.
Innovation Solution
A method involving a database synchronizer that uses HTTP messages to detect changes and push updates to a collaboration document through a client event queue, employing both long and short polling techniques to ensure synchronized data across all users, thereby maintaining a consistent view of the document.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If frequent polling is used to detect database changes, then real-time synchronization is improved, but system complexity and resource consumption increase
Solution Approach 1:
A database synchronizer component is introduced as an intermediary between the database and the document viewer. This synchronizer continuously monitors database changes and pushes updates to the document viewer, eliminating the need for frequent polling while maintaining real-time synchronization. The synchronizer acts as a mediator that handles the complexity of change detection and data push operations.
Solution Approach 2:
The system implements self-service by having the database synchronizer automatically detect changes and push updates without requiring active polling requests from the document viewer. The synchronizer monitors database changes autonomously and proactively notifies the document viewer when updates are available, reducing system complexity while maintaining real-time synchronization.
2Reliability
If polling is used to detect database changes, then data consistency is improved, but time consumption increases
Solution Approach 1:
The database synchronizer serves as an intermediary that continuously monitors database changes and pushes updates to the document viewer. This eliminates the need for the document viewer to repeatedly poll the database, significantly reducing time consumption while maintaining data consistency through proactive change propagation.
Solution Approach 2:
The database synchronizer performs preliminary action by continuously monitoring and detecting database changes before they are needed by the document viewer. When changes occur, the synchronizer immediately pushes the updated data to the document viewer, eliminating waiting time associated with polling and ensuring data consistency without time loss.
3Productivity
If change propagation mechanism is added, then collaboration efficiency is improved, but system complexity increases
Solution Approach 1:
The database synchronizer is introduced as an intermediary component that handles change propagation between the database and document viewer. This dedicated synchronizer component simplifies the overall system architecture by centralizing the change detection and data push operations, making the system more maintainable despite the added functionality for improved collaboration efficiency.
Solution Approach 2:
The database synchronizer implements self-service by autonomously detecting database changes and pushing updates to the document viewer without requiring manual intervention or complex coordination mechanisms. This self-service approach improves collaboration efficiency while keeping the added complexity manageable through automated operations.
Data Source
AI summary
A method for synchronizing a database with displayed data, includes providing a data feed to receive data from the database to provide displayed document data, detecting a database change to the data within the database by a database synchronizer to provide a change event, polling the database synchronizer using an HTTP message to detect the change event, and pushing the database change to the displayed document data to update the displayed document data in accordance with the database change and the polling. The polling includes long polling and short polling. A polling servlet within the database synchronizer performs the polling by the database synchronizer. The database synchronizer updates the displayed document data by way of a data structure. The data structure is a queue.


