Lesson 6: Defining an Agent

This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating a consolidated database.

Next you define an Agent. This Agent represents an instance of the MobiLink Agent running on a remote device. You must create a separate Agent for each remote device you are managing.

 Define an Agent
  1. In Sybase Central, click View » Folders.

  2. Under MobiLink 12 expand Central Admin Tutorial, Consolidated Databases, Tutorial.

  3. Right-click Agents and click New » Agent.

    The Create MobiLink Agent Wizard appears.

  4. On the Welcome page, choose Set Up a Single Agent and click Next.

  5. On the Agent ID page, type AID_JOHN for the Agent ID. The Agent ID can be any value you like, but each Agent must have a unique ID. By convention, Agent IDs begin with the prefix AID_ and usually the second part of the agent ID is the MobiLink user name used by the Agent. Optionally, you could enter a description for the Agent in the Description field. Click Next.

  6. The Remote Database page lets you define a remote database to be managed by this Agent. This does not actually create the database; you do that later. For Remote Schema Name, select Tutorial Application v1.0, which is the name you defined in the previous lesson, from the dropdown list.

  7. If you have an existing synchronization system, fill in the Connection String field with a connection string that the MobiLink Agent can use to connect to the remote database that is already on your device.

    If this is a new synchronization system, enter the following connection string in the Database Connection String field:

    start=dbeng12;SERVER=tutorial_v1;DBF={db_location}\tutorial_v1.db;UID=DBA;PWD=sql

    This string value uses the macro {db_location}. This macro is replaced by the directory on the remote device where application databases are stored. Click Next.

  8. On the Agent Configuration page, type 30 and choose Seconds for the Synchronization Interval. The synchronization interval controls how frequently the Agent synchronizes its agent database. Synchronizing the agent database is how an Agent receives new tasks to perform and uploads the results of tasks it has already performed.

  9. On the Agent Configuration page, type 10 and choose Seconds for the Administration Polling Interval. The administration polling interval determines how frequently the Agent checks for requests from the server for it to synchronize or perform other actions.

    Note

    The short values chosen for the synchronization interval and administration polling interval provide a very responsive Agent, which is important for a demonstration or for troubleshooting. However, using short values globally in a production system results in increased load on your server and reduced performance.

  10. Click Finish.

  11. Proceed to Lesson 7: Configuring the Agent on the remote device.