By default, Meteor has a nice mechanism that syncs Mongo data across clients with collections/pubs/subs.
But some apps may want to send or “stream” data from one client to one or more other clients, without the overhead of dealing with collections (even if in-memory minimongo), publications, or subscriptions.
An official solution to this would be nice.
What do you recommend MDG?
Can a lightweight communication mechanism be officially added?
Considering how Meteor is praised as a tool for making “real time” applications, it seems like a given that Meteor should have something like this.
Some community solutions exist:
krishnasrinivas/meteor-broadcast (written in 2013 but still works (just needs missing
randompackage dependency) and is the smallest amount of code)
- How to publish without collections
- Collections with no connection
That last two examples currently seem like the most official ways, but they seem a little more heavy/complicated than necessary for simple use cases (for example streaming accelerometer data from one client to another). My client receiving data doesn’t need a client collection (it doesn’t need selecting, sorting, etc), it just needs to react to a piece of data when it is received from another client, without any overhead.
- Meteor and the Internet of Things (IoT) - whats best to use? Collection, Meteor-Streams, Streamy
- Broadcast to connected clients
So I know there’s ways to do this, but some of these ways are either not obvious (reaching into Meteor’s internals like Streamy) or seemingly too heavy (using minimongo collections and publishing transient data).
It’d be super awesome to have an official way to do this and have it documented on docs.meteor.com.