I can listen for changes using a library for one of supported languages. It's NodeJS in my case, and the code looks like this:
r = require('rethinkdb')
r.connect()
.then(function (conn) {
return r.table("messages").changes().run(conn);
})
.then(function (change) {
change.each(function (err, item) {
console.log(item)
});
});
But I wonder, if it's possible to run some request, or procedure that is executed by the RethinkDB engine itself so that not to have to add a listener procedure on the language level.
As RethinkDB is always on, and is listening to changes, I suppose technically it can do some work there?