I’m trying to figure out how to observe a database for changes, but I can’t find any up-to-date information on how to do it. I found some several years old threads in various forums that say that it’s not possible out-of-the-box, and that the solution is to implement some custom code in a afterUpdate event handler to push a message to clients that are subscribed to some custom channel…
This sounds a bit convoluted - I’m just trying this out in an effort to compare Backendless to Firebase, and in Firebase it’s as simple as doing
var ref = firebase.database().ref('messages/test');
ref.on('value', function(snapshot) {
console.log("Value changed, new value: '" + snapshot.val().message + "'");
}
I’m kind of surprised that there doesn’t seem to be a straight forward way of doing this in Backendless, but maybe I just didn’t look in the right place?