From Gateway to Client: Streaming API

<< Click to Display Table of Contents >>

Navigation:  The API > JSON API > Real Time Communication >

From Gateway to Client: Streaming API

 

Overview

The Streaming API give developers low latency access to the Gateways stream of information. Once connected, the gateway will start pushing messages indicating telegrams or other notifications that have been occurred. No need for the client to constantly poll REST resources.

 

Differences between Streaming and REST

Connecting to the streaming API requires keeping a persistent HTTP connection open. In many cases this involves thinking about your application differently than if you were interacting with the REST API.

You normally start the streaming connection in a separate process/thread, because this function is actively responsible to receive asynchronous messages and forward this to your main thread accordingly.