Skip to main content
2 of 2
edited tags
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62

Implement Simple Update Protocol (SUP) endpoint

http://code.google.com/p/simpleupdateprotocol/

The basic concept is that instead of polling individual API calls for changes, you make a single call to a 'SUP endpoint' which indicates any changes that have occurred in the last X seconds and you can make then appropriate API call to get the new data.

Use case:
I want to track updates to several questions at once.

The current options are to make API calls for each question (or bundle them together) and then check the timestamps and compare them to the last time I queried -- there is a lot of wasted bandwidth retrieving questions that didn't have any changes. To alleviate this, I could poll less frequently; but the end-user wants to be notified of the changes ASAP.

With SUP, I make one call to the SUP endpoint and I can determine which questions have changed and go retrieve them. Since the JSON returned is just a hashed key/value representing the changed data (and not the whole "Question structure"), I would anticipate a considerable bandwidth savings -- in addition to making it easier for developers to find out when data has been changed.

swanson
  • 725
  • 5
  • 10