How download timestamps are generated and used

MobiLink generates and uses a timestamp for timestamp-based downloads as follows:

  • After an upload is committed and immediately before invoking the prepare_for_download event, the MobiLink server fetches the current time from the consolidated database and saves the value. This timestamp value represents the start time of the current download; the next synchronization should only download data that changes after this time.

    Note

    If the consolidated database supports snapshot isolation, then the download timestamp is the minimum of:

    • the current time

    • the start of the oldest open transaction

  • The MobiLink server sends this timestamp value as part of the download, and the client stores it.

  • The next time the client synchronizes, it uses the timestamp value for the last_download_timestamp that it sends with the upload.

  • The MobiLink server passes the last_download_timestamp that the client just uploaded into your download scripts. Your scripts can then select changes with timestamps that are newer or equal to the last last_download_timestamp to ensure that only new changes are downloaded.

 Where the last download time is stored
 Changing the last download time
 See also