Server-initiated synchronization allows you to initiate synchronization on the client when something changes on the consolidated database. Model mode provides a way for you to set up server-initiated synchronization. This method provides a limited version of server-initiated synchronization that is easy to set up and run.
To set up server-initiated synchronization (Sybase Central Model mode and Deploy Synchronization Model Wizard)
Use the Create Synchronization Model Wizard to create a MobiLink model.
With your model open in Model mode, open the Notification tab at the top of the model.
Select Enable server-initiated synchronization.
Select a consolidated database table to use for notification.
A change to the data in this table results in a notification being sent to the remote database. The notification triggers a synchronization.
You can only choose tables for this purpose for which you have defined a timestamp-based download cursor (the default). The notification is based on the contents of the download cursor.
Select a polling interval. This is the time between polls. You can choose a predefined polling interval or you can enter an interval. The default is 30 seconds.
If the Notifier loses the database connection, it recovers automatically at the first polling interval after the database becomes available again.
Optionally, change the isolation level of the Notifier's database connection. The default is read committed.
Be aware of the consequences of setting the isolation level. Higher levels increase contention, and may adversely affect performance. Isolation level 0 allows reads of uncommitted data—data which may eventually be rolled back.
Optionally, change the gateway by which notifications are sent. The default is a default_device_tracker gateway. See Gateways and carriers.
To deploy a model with server-initiated synchronization
Deploy your model:
See Deploying models.
The model is deployed. For information about the files that are created, see Synchronizing a deployed model.
To use server-initiated synchronization, you must:
Navigate to the directory you chose when you first started the Create Synchronization Model Wizard. It holds your model with the extension .mlsm. It also holds the following sub-directories:
In the Model mode version of server-initiated synchronization, the MobiLink server uses a download_cursor script for a table to determine when to initiate a synchronization. It does this by using the download_cursor script to generate a request_cursor for the Notifier. When using this version of server-initiated synchronization, you cannot customize your request_cursor.
Model mode also sets up a default device tracker gateway for sending notifications. You can customize your gateway. See Gateways and carriers.
While Sybase Central Model mode provides a simplified version of server-initiated synchronization, you can also set up a complete version of server-initiated synchronization.
For a description of the complete implementation of server-initiated synchronization, see MobiLink - Server-Initiated Synchronization.
For an overview of what is required to set up server-initiated synchronization outside of Model mode, see Quick start to server-initiated synchronization.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|