Meteor reactivity send and forget

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.

Another approach would be to use a package like this one to have a simple pub/sub: https://github.com/wojtkowiak/meteor-direct-stream-access

Or use DDP directly like the above package does it:

1 Like

Since I am using this ddp library for Android Native apps.

Would this library work across this ddp library?

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.

1 Like

I will have a look at this. Thanks for the help

Were you able to make it work?