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.
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.
Deploy your model:
From the File menu, choose Deploy.
Follow the instructions in the Deploy Synchronization Model Wizard.
See Deploying models.
On the Server-Initiated Synchronization Listener page, configure options for your Listener.
The model is deployed. For information about the files that are created, see Synchronizing a deployed model.
To use server-initiated synchronization, you must:
Start the MobiLink server.
Perform a first synchronization (if one has not yet been done).
Start the Listener.
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 Model mode, see Quick start guide to server-initiated synchronization.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|