Push request requirements

The requirements for push requests are dependant on the method the MobiLink server uses to communicate with devices. All push requests require subject and content columns. If you are using light weight pollers to poll for push notifications, create a poll key column to identify them. Create gateway and address columns if you are using gateways to send push notifications.

You do not need to create push request columns if they already exist on your system. After you have satisfied the push request requirements, you are can work with them. See Working with push requests.

Push request requirements when using light weight pollers (recommended)

You must create the following columns when you are using light weight pollers to poll for push notifications:

Column

Type

Description

Poll key

VARCHAR

The key used to identify a light weight poller. Each light weight poller sends a unique key to identify itself on the MobiLink server.

Subject

VARCHAR

The subject line of the message.

Content

VARCHAR

The content of the message.

Push request requirements when using gateways

Unless otherwise specified, you must create the following columns when using gateways to send push notifications:

Column

Type

Description

Request ID

INTEGER

Optional. The unique ID of a push request.

This column name is required for some Notifier events. See Notifier events.

Gateway

VARCHAR

The name of the gateway to which the message is sent.

Subject

VARCHAR

The subject line of the message.

Content

VARCHAR

The content of the message.

Address

VARCHAR

The destination address of a device.

Resend interval

VARCHAR

Optional. The time interval between message resends.

The resend interval is useful when using a UDP gateway on an unreliable network. The Notifier assumes that all attributes associated with the push requests do not change; subsequent updates are ignored after the first poll of the request. The Notifier automatically adjusts the next polling interval if a push notification must be sent before the next polling time. You can stop a push request from being sent using synchronization logic in the request_cursor event. Delivery confirmation from the intended Listener may stop a subsequent resend. See request_cursor event.

Time to live

VARCHAR

Optional. The time until the resend expires.

Example

The following example satisfies the push request requirements for using light weight polling by creating the necessary columns in a SQL Anywhere consolidated database table:

CREATE TABLE PushRequest (
    req_id INTEGER DEFAULT AUTOINCREMENT PRIMARY KEY,
    poll_key VARCHAR(128),
    subject VARCHAR(128),
    content VARCHAR(128)
)

You only need to create this table, or something like it, if the push request columns are not available elsewhere. These columns can exist across multiple tables, in existing tables, or in a view.

See also