I have a meteor app that is feeding data in a MongoDB database to charts written in google charts. I have a second app (written in java) that is continuously updating records in the MongoDB database. Even though the java app is updating records multiple times per second, it appears that the data on the client side is updating only every few seconds. Is there a way to speed this up or does anyone have any ideas on how to diagnose why it’s slow?
Share
There are two places you want to look.
Firstly, the
mongo_driverin themongo-livedatapackage polls mongo (every 10s right now by the looks of things) on the server side to keep in sync.Secondly, syncing over the wire happens using the
streampackage; I’m not 100% sure how it works, but that’s where you’d have to look to see how messages are being buffered / sockets being polled etc. But apart from latency + polling timeouts it should be ‘instant’.So my guess is you’d want to focus on the first part.