Our Work: Well Tracking Database
The client used a custom web application to track information about wells around the world. But, without a good Internet connection, workers couldn’t use the application while in the field.
The client wanted to add an offline mode to the application, allowing field workers to view and update well information and then synchronize with the central database after returning to the office.
Resource Data built a custom data synchronization process to support the offline mode.
At 100GB, the application’s database is too big to be completely replicated for offline use. Therefore, for the first load, the system
- Filters the data to that relevant to the user (for example, a user in Russia just needs Russian wells)
- Creates bulk insert statements for the filtered data
- Compresses and divides the information into 10MB chunks
After downloading these chunks, the user’s device reassembles the chunks and runs the data insert. Subsequent synchronizations then do a two-way transfer (merge replication) of changes since the last sync.
With 10,000 application users, the system needed robust logic for resolving data editing conflicts. For example, when synchronizing, which value is used if online and offline users update the same well? To ensure the application’s data is always correct, the process evaluates which information changed and then compares timestamps to find the most recent value.
The synchronization process also includes real-time logging, which allows you to view an offline user’s status and to watch the synchronization progress.
We worked closely with the client to ensure the synchronization process worked correctly in all scenarios. To support this, we released new versions frequently, enabling field testers worldwide to provide early and frequent feedback.
Initially, we tried using the Microsoft Sync Framework as the basis for the system. However, when it couldn’t successfully handle all of our client’s scenarios, we developed the customized solution, targeted specifically to our client’s needs.