Map Cache Update via Database Trigger Logging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing map cache systems require manual or periodic updates, which are resource-intensive and prone to errors, and often result in outdated tiles being served to clients, especially when dealing with frequently modified data or large geographic features.
Innovation Solution
Implementing a system that uses database triggers to log modifications in real-time, allowing background processes to identify and update dirty map tiles automatically, eliminating the need for human intervention and unnecessary regeneration of up-to-date tiles.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual or periodic updates are used for map cache, then resource consumption is reduced, but map tiles become outdated and accuracy deteriorates
Solution Approach 1:
The system uses database triggers that automatically log modifications to the log table when spatial database records are changed. This self-service mechanism eliminates the need for manual intervention or external monitoring systems, allowing the map cache update system to automatically detect and respond to data changes without consuming excessive resources.
Solution Approach 2:
The system performs preliminary actions by logging all spatial database modifications in real-time to the log table through database triggers. This preliminary logging ensures that when the background process runs, it already has all the information needed to identify dirty tiles, eliminating the need for full cache regenerations and reducing overall resource consumption.
2Reliability
If full map cache regeneration is performed periodically, then all tiles are updated, but resource waste increases due to regenerating already-up-to-date tiles
Solution Approach 1:
The system segments the map cache update process by identifying and updating only the specific tiles that contain modified geometries (dirty tiles). Instead of regenerating the entire cache, the background process queries the log table to determine which individual tiles need updating, thereby avoiding waste of resources on already-up-to-date tiles.
Solution Approach 2:
The system applies local quality by treating different tiles differently based on their actual update needs. Tiles that contain modified geometries are updated, while tiles that remain valid are left unchanged. This selective approach ensures resource efficiency while maintaining cache currency.
3Productivity
If manual updates are performed, then resource consumption is minimized, but error probability increases and productivity decreases
Solution Approach 1:
The database triggers automatically log modifications to the log table without requiring external monitoring systems or manual intervention. This self-service capability simplifies the overall system architecture while dramatically improving update efficiency, as the system automatically tracks and processes changes as they occur.
Solution Approach 2:
The system implements feedback by continuously monitoring the log table for new modifications and automatically processing dirty tile updates. The background process queries the log table, identifies tiles that need updating, and regenerates only those specific tiles, creating a closed-loop system that responds automatically to data changes.
4Measurement precision
If real-time logging of all modifications is implemented, then accuracy is improved, but device complexity increases
Solution Approach 1:
The database triggers provide self-service logging by automatically recording all spatial database modifications in the log table with precise details including geometry changes. This eliminates the need for complex external monitoring systems while maintaining high accuracy in change detection.
Solution Approach 2:
The log table serves as an intermediary that captures all modification details between the spatial database and the map cache update process. This intermediary structure simplifies the overall system by providing a centralized, structured record of all changes, making it easy to identify dirty tiles without complex analysis.
Data Source
AI summary
Systems, methods, and other embodiments associated with automatically updating a map cache are described. In one embodiment, a method includes detecting a modification to a spatial database record having a geometry attribute and recording, in a log table, an identifier for the record that was modified. The method includes periodically accessing the log table to identify map tiles that include at least one geometry of records that have been modified and periodically generating the identified map tiles. The generated map tiles are stored in a map cache.


