Lesson 9: Issue push requests

For server-initiated synchronization, you can issue push requests by populating the PushRequest table directly, or making a change in the Dealer table. In the latter case, the Notifier begin_poll script detects the change in the Dealer table and populate the PushRequest table.

In either case, the PushRequest table supplies rows to the Notifier request_cursor script, which determines how remote devices receive messages.

To insert a push request directly into the PushRequest table prompting server-initiated synchronization
  1. From Interactive SQL, connect to the MLconsolidated.db database and type the following:

    INSERT INTO PushRequest(mluser, subject, content)
        VALUES ('sis_user1', 'sync', 'not used');
    COMMIT;
  2. Wait a few seconds for the synchronization to occur.

When populated, the PushRequest table supplies rows to the Notifier's request_cursor script. The request_cursor script determines what information is sent in the message, and which remote devices receive the information.

To make a change in the consolidated database Dealer prompting server-initiated synchronization
  1. From Interactive SQL, type the following:

    UPDATE Dealer
        SET RATING = 'B' WHERE name = 'Geo'; 
    COMMIT;
  2. Wait a few seconds for the synchronization to occur.

In this case, the Notifier begin_poll script detects changes in the dealer table and populates the PushRequest table appropriately. As before, once the PushRequest table is populated, the Notifier request_cursor script determines what information is sent in the message, and which remote devices receive the information.

See also