by hbcondo714 · 9y ago · 0 comments
You could add a separate "changes" feed to help API consumers, or inline version info to the main API results.
Check out PostgreSQL's LISTEN and NOTIFY:
https://www.postgresql.org/docs/9.6/static/sql-listen.html
https://www.postgresql.org/docs/9.6/static/sql-notify.html
A related HN discussion a few years ago: https://news.ycombinator.com/item?id=6689213
If not, ask the client to provide an HTTP callback endpoint, and ping it to notify of new fresh data on your side. Using WebSocket is also an option.