Previously our meteor app working fine so far on 1.6+ we don’t have any issues with our database structure but with the latest updates we observed that the views type of collections takes to 3-10 minutes before it refreshed the data on client side.
Here’s the picture of some of our views collections.
With that approach we didn’t encountered any issue so far on 1.6+ version but on the latest version @ 1.7 it doesn’t working anymore… The data on client changed if I reload the page.
Is there any reason why it happens? And some suggestion on how to fixed it?
UPDATE
Ok, I’ve found the specific issue. The issue is on subscription it doesn’t update the data on client side with the fresh data rendered by publication.
(Still investigating…)
UPDATE
It’s now fixed by upgrading the node version to v8.9.1
Remember, until you get a valid query in the publication it is not reactive. So when your initial if(params... does not pass, the Meteor.publish is not reactive.
If _route.params._id is possibly changing then on client side, you will want a reactive variable for _route.params._id so that the autorun will get executed on changes to _route.params._id.
No errors on console log. The subscription is running fine (I think) because if I put a console log on publication I got a right results. It’s just cant update the client data. Maybe because the meteor only observed the update and insert event on actual collection and not the query results of publication? If that’s so then I think it’ll be good to add a feature where it’ll also watch the difference of data output of publication and the temporary data on client side.
Nope, it was there, I just didn’t include it here. The publication returns correct data and that should update the client side but it isn’t. No errors it’s just can’t update the client side with the updated results of publication.
Those packages build on Meteor’s pub/sub API to provide reactive aggregation livedata to the client. I haven’t tried views yet, but they appear at first sight to be broadly compatible with normal collection operations. Given that the latest official nodejs MongoDB driver has no explicit support for views, I suspect they’re supposed to work transparently and it wouldn’t be too difficult to get them to work in Meteor.