Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » MobiLink - Getting Started » MobiLink Models » Model mode

Authenticating to external servers in Model mode Next Page

Setting up server-initiated synchronization in Model mode


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.

Notifications tab
To set up server-initiated synchronization (Sybase Central Model mode and Deploy Synchronization Model wizard)
  1. Use the Create Synchronization Model wizard to create a MobiLink model.

  2. With your model open in Model mode, open the Notification tab at the top of the model.

  3. Select Enable Server-Initiated Synchronization.

  4. Select a consolidated database table to use for notification.

    A change to the data in this table will result 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.

    See Writing download_cursor scripts.

  5. 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 will recover automatically at the first polling interval after the database becomes available again.

  6. 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.

  7. 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
  1. Deploy your model:

    1. From the File menu, choose Deploy.

    2. Follow the instructions in the Deploy Synchronization Model wizard.

      See Deploying models.

    3. On the Server-Initiated Synchronization Listener page, configure options for your Listener.

  2. The model is deployed. For information about the files that are created, see Synchronizing a deployed model.

  3. To use server-initiated synchronization, you must:

    1. Start the MobiLink server.

    2. Perform a first synchronization (if one has not yet been done).

    3. Start the Listener.

  4. 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:

About server-initiated synchronization (not in Model mode)

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.

See Writing download_cursor scripts and request_cursor property.

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.