Lot's of people mentioning "reactivity as being expensive/non-scalable". is there a good read up on what reactivity in the context of meteor.js is and why it is expensive ?
- Meteor uses MongoDB as a data store
- You write queries on the server called "publications", that make documents available to the client
- The client implements "MiniMongo", which basically lets you query the documents that have been published via your publications using Mongo queries as if you were writing them straight from the server
- The publications are (by default) reactive, so whenever any of the documents in your queries is added/removed/modified, the changes propagate instantly to your client.
- The original view library (Blaze) would seamlessly update with these changes in your UI.
From memory, the performance bottlenecks here are:
- It uses the Mongo OpLog to determine when changes have been made to the collections, which makes the queries themselves quite slow.
- For every dataset published to the client, Mongo keeps a cache of that dataset on the server so it knows when it needs to send deltas over the wire.
So for both of these reasons, once your queries get big, they get SLOW.
The other thing that is costly (but not fundamentally a fault of Meteor itself), is that most people building web apps model their data in relational terms. If you try and apply that to Mongo, (ie, treating collections as tables and "joining" across them instead of nesting data hierarchically inside your documents), you'll end up writing slow queries.