Search code examples
nest-api

What are the pros and cons of using nest rest streaming APIs over rest APIs?


Nest supports rest streaming and rest APIs for fetching thermostat and structure data. On rest API calls, they have limit of 1 API call/sec and rest streaming apis poll data every 30 secs (pls correct me if i am wrong)? What are other pros and cons of using nest rest apis over nest rest streaming apis?


Solution

  • Speed is the mane advantage, the response time of the various methods from fastest to slowest is:

    1. Firebase (ie WebSockets, which send change notifications, network latency is the biggest overhead)
    2. REST streaming (setup and tear down connection on change and timeout)
    3. REST polling (setup and tear down connection on each poll, can't be any faster than polling interval, which is below the rate limit)