App using both Redis and MongoDB collections


#1

I am looking to (re)build a NodeJS app using Meteor. It’s a great platform and after some research I think it can do everything I need, but there are a couple of things I need to get advice on (approach and packages) before I can commit!

The app needs the user to be able to control the desktop site from a mobile, so when a desktop client connects, a collection will be created with a random key. Then when a mobile client connects, the user can input that matching key and subscribe to that collection.

I’ve read that Reddis support is being added, but will it be possible to have one app with collections on both MongoDB and Reddis at the same time? I see that I can do that using this package (https://github.com/meteor/redis-livedata), but would be better to use core functionality if it’s coming. I want my large database on MongoDB, and then tiny rooms on Reddis (for speed and to not pollute the main database).

Secondly, what is the best way to make sure a collection is created with a unique ID? I could generate a key, check if a collection with that key exists, and if it does, try again… but I feel like maybe there is a better / quicker way of doing this?

Lastly what would be the cleanest and most robust way of making sure a collection is destroyed when the desktop client disconnects? I don’t need the data to be persisted.

Looking forward to everyones ideas and input,
Cheers.