That strongly reminds me of Meteor. It's crazy to think how many modern problems were solved by design there years ago. I wish you the best of luck, having a real-time database on the client does make things much easier.
To be fair, maybe it was unrealistic to expect Meteor to do real-time communication for my game.