Gevious
Gevious

Reputation: 3252

Meteor dynamic update

I understand that meteor automatically updates the view based on the underlying model, ie if there is a model change, then all the clients' views will be updated as well.

What happens if a 3rd party app updates the database directly. Will meteor pick up that model change and display it to the view, or is it only model changes done through the meteor stack that will be updated?

Upvotes: 1

Views: 143

Answers (2)

Arie Skliarouk
Arie Skliarouk

Reputation: 472

Meteor polls MongoDB each ~10 seconds or so. You need to use ddp-client to update MongoDB through Meteor for your changes to affect the model immediately:

Using node ddp-client to insert into a meteor collection from Node

Upvotes: 1

Kristoffer K
Kristoffer K

Reputation: 2053

You mean if you have some other app updating the same MongoDB? Meteor will notice and show this change to the user!

If I for example update my MongoDB directly from the MongoHQ's console it's reflected in my app instantly.

Upvotes: 2

Related Questions