Hiyas, I’d like to share my experiences using Meteor with MySQL.
One of my companies is using Ben Green’s numtel:mysql package, which provides reactive support in Meteor for MySQL. It relies on the MySQL binary log (using row mode) as the event source - similar to how the oplog is used with MongoDB.
We are running it in a production system used for real-time location tracking. We recently submitted some improved code which dramatically increased its performance and Ben has incorporated it into the latest release.
We chose MySQL over PostgreSQL for two reasons:
*We already had a LEMP-based ecosystem for our other apps and use MySQL slave-replication.
*We are using the TokuDB storage engine, which is not supported by PostgreSQL.
TokuDB is a fantastic piece of technology that has improved our database performance because of its more efficient fractal tree data structure. It has reduced our storage requirements thanks to its support for table compression and it has allowed easier maintenance by supporting online schema and index changes.
TokuDB is only officially supported with the MySQL forks Percona Server and MariaDB. Only Percona Server is compatible with Meteor because the current stable version of MariaDB (10.0) does not record the precision of datetime/timestamp fields in its binary log, but this will be fixed in MariaDB 10.1.
I strongly encourage the MDG to implement official Meteor support for MySQL based on Ben Green’s package.
At the moment, there is no “minisql” equivalent of “minimongo” so we sometimes use Mongo.Collections in memory as temporary storage, e.g. where the option “connection:null” is set.
However, I just did some googling and found sql.js - a port of sqlite to JavaScript - https://github.com/kripken/sql.js/ - I wonder if this could form the basis of a “minisql” for Meteor.
Also, the current official Meteor accounts packages are directly coupled with MongoDB, so we’ve had to develop our own accounts system.
It would be great if the official accounts-base code could be tweaked to allow users to add handlers to intercept/override the bits of code that initialize and access the Mongo.Collection “users”.