I have two applications that I need to synchronise. One of them will receive data from users and the other will display the data. Both applications will work on different se
I got a clue from this question How to properly use Meteor.connect() to connect with another Meteor server. I missed it because it was about the old Meteor.connect()
that changed to DDP.connect()
.
This worked on client and server
var remote = DDP.connect('http://server1.com/');
Items = new Meteor.Collection('items', remote);
remote.subscribe('items', function() {
var items = Items.find();
console.log(items.count()); // get 1
});
Now I can watch for changes in application 1 from application 2 using Items.find().observe()
Warning
There is a bug on Meteor that will stop the connection between applications:
Update
The bug was solved
Update 2
This is a sample project tested with Meteor 0.6.6.2 https://github.com/camilosw/ddp-servers-test