Storing and Forwarding Events

While some data benefits from being sent to the cloud instantly, there is a cost for choosing to do so. Firstly, every time you start and stop the cellular data session, power is consumed. Secondly, encapsulating each reading for transmission individually, causes more data to be sent over the air and this is reflected in pricing.

In order to optimize power and bandwidth consumption, you can chose to have your readings stored and forwarded on a periodic basis. The Cloud Interface provides a buffer for events that you wish to store, and allows you to dynamically configure how often that buffer is sent to the cloud. This is referred to as store and forward.

Configuring store and forward involves setting the maximum time between transmissions via the /cloudInterface/store_forward resource. For example, if the store and forward buffer is set for 60 seconds and a "cloud stream" event is generated 30 seconds after the last transmission, the contents of the buffer will be sent with the "immediate" event, and the 60 second timer resets.

The steps below illustrate how to configure the maximum time between transmissions for store and forward, and how to modify the Observation created above to use store and forward:

  1. Navigate to Device > Resources.
  2. Locate and expand the cloudInterface > store_forward Resource.
  3. Click on the edit button to the right of the Period property and set the value to 60. This controls how often the Resource is polled.
  4. Click Set to save the update.
  5. Navigate to Device > Observations.
  6. Locate the light Observation created in the Sending Events to the Cloud Immediately section.
  7. Click the edit icon to edit the Observation.
  8. Set Send events to to Store & Forward and click Save.
  9. Verify that the Destination column for the Observation indicates Store & Forward.
  10. Wait for 60 seconds for the timer to elapse to ensure that the value has been sent to the cloud.
  11. Navigate to Device > Streams and locate the stream corresponding to the Observation.
  12. Click on an event to display its details. Note the time values for Generated date and Reception date which should be approximately 60 seconds or more apart.