Hello Tom,
I'm a bit new to apex and I wonder if there is a way to check in apex, if new data was inserted in my DATA table.
I want to fire a dynamic action that refreshes the region only when new data has arrived.
For now, this works for me:
setInterval("jQuery('#REGION_SENSORS').trigger('apexrefresh');", 10000);
But it always fires, no matter if new data arrived or not.
Greetings from Germany!
Push notifications, ie, the client being told when something on the server has changed is not a trivial undertaking to do it "properly".
Dan McGhan has a demo of this using continuos query notification and node.js here
https://jsao.io/2015/02/real-time-data-with-node-js-socket-io-and-oracle-database/ but you'll see, there's a number of moving parts here.
It may well the case that you want to go for a simpler hybrid, depending your requirements. For example, you might populate a hidden item/region/etc with a simple query indicating that its "time to refresh" and populate the source of that using AQ etc.
Others welcome to add their input if they've tackled the issue.
Hope this helps.