Difference between revisions of "Synchronization"
(→Servers involved in synchronization)
|Line 87:||Line 87:|
== See also ==
== See also ==
Revision as of 15:26, 9 July 2019
Data synchronization is the process of establishing consistency among data from a source to a target data storage and vice versa and the continuous harmonization of the data over time.
In our case, consistency has to be ensured of the data stored on the CRM server and the data stored on a end user device using Resco Mobile CRM app.
When you synchronize your app for the first time, you basically download to the device a subset of the server database. This subset refers to the time instant when it was downloaded. (Or synced last time – hence the name LastSync time. Strictly speaking there is no LastSync time for the database as a whole. Instead, each table has its own LastSync time.)
Once you have the data on the mobile device, you can start using it – view, search, but also create, edit or delete. Of course, the same data items may be changed on the server, too.
The purpose of the synchronization is to
- Download server changes to the client
- Upload client changes to the server
- Resolve eventual conflicts
What data is stored in the app
CRM servers have large databases with a lot of data. Users of the mobile app usually need only a small subset of entities, and they don't need the full set of fields for each record.
Types of synchronization
When talking about data synchronization, we sometimes need to differentiate between its various types.
Full vs incremental
- Full synchronization - Creating a copy of all server records on the client. This is used when you launch the mobile app for the first time.
- Incremental synchronization - Server sends its changes to the client; client sends its changes to the server.
Full synchronization can be forced
- for a new customization (using Woodford)
- for selected entities (using Woodford)
- by the client (Setup form > Delete Data)
Foreground vs background
- In foreground mode, the app displays progress dialog; users must wait until the synchronization finishes
- In background mode, users can use the application freely during synchronization. When both the user and the synchronization process attempt to write to the database at the same time, users will be notified and they have to wait.
(Settings > Sync Login on/off)
Manual vs automatic
Automatic synchronization can be periodic or triggered by app start or data change.
Automatic synchronization is controlled by application settings. It can be triggered in several ways:
- If AppSettings.AutoSyncAfterStart >= 0 // #seconds to wait before syncing after application start
- If AppSettings.AutoSyncDelay >= 0 // #seconds since the last sync
- If AppSettings.AutoSyncAfterChange >= 0 // #seconds to wait before syncing after data change
- Triggered by record change: Created/Deleted/Changed (when Save button pressed).
- Even NN-record creation/deletion (association/disassociation) triggers sync.
- If AppSettings.SyncEmailOnSend==true:
- Email change triggers email sync (unless sync is already triggered) // Email-only sync = syncing only emails
- When changing online <-> offline mode
- AppSettings.GoingOnlineMode // NoAction | AskUserToSync | WarnUserMustSync | ForceSync
- AppSettings.GoingOfflineMode // NoAction | AskUserToSync | WarnUserMustSync | ForceSync
Conditions for auto-sync:
- Settings > Sync Login off
- Password saved
- No sync errors from previous sync
Servers involved in synchronization
Resco license server: iservices.resco.net
- external user resolution
- ApplicationVersionCheckService // "Update Available"
- Dynamics CRM
- CRM4: ~deprecated
- CRM5: Dynamics 2011/2015/365; Online / On premise
- Resco XRM
- DropBox, Box, GoogleDrive, OneDrive
- (Azure - attachments)
- Synchronization steps - in-depth technical description of the synchronization process
- Synchronization troubleshooting - evaluate performance, recognize common issues
- Sync Filter - define what data from the server is replicated on the mobile app
- Speed up synchronization - optimize synchronization of entity records
- Document filters - optimize synchronization of documents