How would RethinkDB's real-time capabilities compare to doing something like this with Mongo? (I'm genuinely curious about any shortcomings with the following implementation, besides scaling.)
// plugins/replicate.js
var replicator = require('replicator');
module.exports = exports = function replicatePlugin (schema, options) {
schema.pre('save', function (next) {
// notify subscribers of save
replicator.notify('save', this);
next();
});
}
// schemas/game.js
var replicatePlugin = require('../plugins/replicate.js');
var GameSchema = new Schema({ ... });
GameSchema.plugin(replicatePlugin);