@ramez I also noted the lack of an optimizer in RethinkDB, as well as no support for unique secondary indexes.
Regarding reactivity triggered by oplogs & binary logs, I don’t think they are as bad or limiting as you think.
Having thought a lot about this, I have come up with a rough guideline to determine if there will be a scalability issue:
- If you can successfully set up a MongoDB or MySQL slave database that can keep up with the master database server used for your application, you can theoretically create a reactive Meteor app that can handle that level of load on the master database.
Explanation:
Oplogs & binary logs were intended to be used for implementing asynchronous master-slave replication. The slave database server reads the oplog/binary log produced by the master in real-time and uses it to update its copy of the data.
In order for a master-slave replicated setup to be fit for its purpose, the slave server has to be able to keep up with rate of updates from the master, otherwise the slave lag will continually increase and the slave can no longer be relied upon to be up to date with the master.
We can presume that everyone who is using master-slave replication has a working setup. That is, their slave (on average) keeps up with the master.
My experience and dealings with MongoDB enterprise users are minimal, but in the case of MySQL, master-slave replication is very popular and is used for very busy production servers. Most often, there is only a single thread on the slave MySQL instance responsible for reading the binary log - just like with NodeJS, which is effectively a single-threaded environment.
Hence, the resource demands of reading the binary log are normally not the performance bottleneck in a replicated setup. Bottlenecks are almost always related to the speed/number of CPUs on the server or max I/O rates of the storage subsystem.
So the important question is: How does the demand on system resources differ between:
A Meteor app with reactive publications is similar to a slave database server, except instead of updating the slave database, it triggers the publication of data and sends it to connected clients.
Unlike a slave database server, the Meteor app does not have the overhead of writing to the disk. However, the Meteor app has the overhead of frequently having to make database queries, package the data inside the DDP layer and then send it to all connected clients that subscribed to the published reactive data source.
For this reason, all of the scalability improvements we have implemented in our Meteor MySQL-based app have been achieved by finding ways to speed up the query execution, minimising the amount of data that has to be transmitted to the client and spreading the Meteor’s CPU load over multiple NodeJS processes.
Also, our servers use pure SSD storage, which makes the binary log file access much faster.