Since Meteor reactivity is totally based on subscriptions.
In current case what we do in subscriptions is that we return a cursor from Mongodb.
What I want is not to rely on Mongodb all the time.
For some scenarios I simply want to send the notification and forget it. Just like we do in Socket.io.
Currently in my scenario I have a group chat screen, and I want to show if someone is typing…
So instead of keeping some flag 0,1 in messages collection against each member of that group, I want this to be handled without any database involvement.
Has anyone faced such scenario?
What could be the best logic or best practices for such scenario?
There’s a bunch of options you could take. You could still use Minimongo, but without Mongo. It sounds confusing, because Minimongo is just an in memory cache. If you unset the Collection’s connection it will not try to write and read from Mongo, but you can keep all of it in memory.
You’ll need redis-oplog for this. This is exactly what Synthetic Mutation from Redis-Oplog does. Basically, your publication would behave as if an actual update happened in the database without storing isTyping in the database.