What is a heartbeat interval in the Mobility Server

  • 7007399
  • 17-Dec-2010
  • 10-Dec-2013

Environment

Novell Data Synchronizer Connector for Mobility
Novell Data Synchronizer 1.0

Situation

What is a heartbeat interval in the Mobility Server
Heart Beat interval on Mobility Server explained in detail
Network Push and Mobility Server

Resolution

Most devices have an option to set network push while being connected to the Data Sync/Mobility Server. For Push to work, the device maintains a persistent connection with the server. That is how the server knows how/where to push new events (mail/calendar/contacts) to the device. When the server receives a new event for the device, the server sends a Ping response to the device indicating which folders have changed and the device comes and picks up the changes and syncs it to the device. However, if the server does not receive any changes for the device before the heartbeat interval lapses, then the Ping response is sent with the status indicating that there were no changes.
 
The maximum heartbeat interval that the Mobility server accepts is 1200 seconds and the minimum is 10 seconds.  The device sets the heartbeat interval and informs the server. If the device sets and passes in a value below the minimum heartbeat interval, the server returns the minimum heartbeat interval in the error response to the Device (10 seconds) indicating that the minimum heartbeat interval has to be 10 seconds. If the device sets and passes in a value above the maximum heartbeat interval, the server returns the maximum heartbeat interval in the error response to the Device (1200 seconds) indicating that the maximum heartbeat interval has to be 1200 seconds.
 
Example 1
The following is just a simple example for better understanding of heartbeat interval when the device tries to set the heartbeat interval lower than the minimum allowed.
 
Mobility Server<----5 seconds---Device1 (Device1 sets the heartbeat interval as 5 seconds and sends it to the Mobility Server.)
Mobility Server---10 seconds---->Device1 (The Mobility Server responds saying that the minimum heartbeat interval that can be set is 10 seconds. )
Mobility Server<----15 seconds---Device1 (Device1 set the heartbeat interval as greater than or equal to 10 seconds. In this example, it sets it to 15 seconds and sends it to the Mobility Server.)
 
Let's continue with Example 1. Now since the Device has a persistent connection to the Server, server knows how to get to the Device. If the Server receives a new event for the Device, it sends a Ping to the Device and the Device comes and picks up the change. However, if the server has not received any change and 15 seconds are going to be lapsed, Mobility Server sends a Ping response to the Device with a status indicating that there were no changes.
 
Example 2
The following is an other simple example for better understanding of the heartbeat interval when the device tries to set the heartbeat inteval higher than the maximum allowed.
 
Mobility Server<----1300 seconds---Device1(Device1 sets the heartbeat interval as 1300 seconds and sends it to the Mobility Server.)
Mobility Server---1200 seconds---->Device1 (The Mobility Server responds saying that the maximum heartbeat interval that can be set is 1200 seconds. )
Mobility Server<----1000 seconds---Device1 (Device1 sets the heartbeat interval as less than or equal to 1200 seconds. In this example, it sets it to 1000 seconds and sends it to the Mobility Server.)
 
Let's continue with Example 2. Now since the Device has a persistent connection to the Server, server knows how to get to the Device. If the Server receives a new event for the Device, it sends a Ping to the Device and the Device comes and picks up the change. However, if the server has not received any change and 1000 seconds are going to be lapsed, Mobility Server sends a Ping response to the Device with a status indicating that there were no changes.

Additional Information

The Heartbeat Interval passed by the device is stored in the "deviceconfig" column in "devices" table in the Mobility Database in the element called <HeartbeatInterval>
 
Different devices/OS set different heartbeat interval and that is device/OS specific