MobiLink Synchronization User's Guide
Server-Initiated Synchronization
MobiLink server-initiated synchronization works as follows:
Push requests cause synchronization to occur. A push request takes the form of some data that you insert into a table, or in some cases data inserted into a temporary table or even just a SQL result set. You can create push requests in any way that you cause data to be inserted into a table. For example, a push request could be created by a database trigger that is activated when a price changes. Any database application can create push requests, including the Notifier.
For more information, see Push requests.
The Notifier is a Java program running on the same computer as the MobiLink synchronization server. It polls the consolidated database on a regular basis, looking for push requests. You control how often the Notifier polls the database. You specify business logic that the Notifier uses to gather push requests, including which remote devices should be notified. When the Notifier detects a request, it sends the message associated with the request via SMTP or UDP to a Listener on one or more remote devices. You have the option to send repeatable messages with an expiry time.
To set up Notifiers, you edit a properties file. The properties file is a text file that includes configuration information, including the query that the Notifier uses when it gathers push requests. A properties file can configure multiple Notifiers.
To run Notifiers, you use the dbmlsrv9 -notifier option.
For more information, see Set up the Notifier.
The Listener is a program that is installed on each remote device. It receives messages from the Notifier and initiates action. The action is most frequently synchronization, but can be other things. You can configure the Listener to act only on messages from selected sources, or with specific content.
You can send messages from the Notifier to the Listener on an SMTP gateway or a UDP gateway. When you use an SMTP gateway, you send an e-mail message that your carrier converts into SMS before the Listener receives it. Most carriers provide an e-mail-to-SMS service.
On Windows or Windows CE, the Listener is an executable program configured by command line options. In order to receive a message, the remote device must be on and the Listener must be started.
On the Palm OS, you first create a configuration file by running the Listener program with special command line settings on a Windows machine. Then you copy the configuration file to your Palm device.
For more information, see Set up the Listener.
For example, a fleet of truck drivers uses mobile databases to determine routes and delivery points. A driver synchronizes a report of a traffic disruption. The Notifier detects the change in the consolidated database and automatically sends a message to the remote device of every driver whose route is affected, which causes the drivers' remote databases to synchronize so that the drivers will use an alternate route.
In the following illustration, the Notifier polls a consolidated database and detects a change that it has been configured to look for. In this scenario, the Notifier sends a message to a single remote device, resulting in the remote database being updated via synchronization.
Following are the steps that occur in this example:
Using a query based on business logic, the Notifier polls the consolidated database to detect any change that needs to be synchronized to the remote.
When a change is detected, the Notifier prepares a message to send to the remote device.
The Notifier sends a message over UDP or SMTP. Most telecommunication providers have a service that lets you send SMS messages by sending e-mails via SMTP to a special address.
The Listener checks the contents and sender of the message against a filter.
If the message matches the filter, the Listener runs a program that has been associated with the filter. For example, the Listener runs dbmlsync or it launches an UltraLite application.