I’ve stopped using MongoDB in all new projects. I really don’t feel comfortable using Mongo in production anymore… It’s hard to tell how valid all the recent bashing PR is.
I mean if you could pick any database today… would it be Mongo? For me RethinkDB and Postgres are my top picks.
It’s also very hard to sell a client on data integrity with MongoDB in their stack now. I either have to turn down clients, roll my own stack, or cut out Mongo from Meteor. Losing clients is my largest problem… I haven’t lost any data that I know of but it’s hard to say for sure.
Has anyone else ran Meteor without Mongo as the primary database? I’d love to hear about your setup
I have two Meteor apps now running RethinkDB. One without any Mongo (microservice cluster with REST API and SMS auth) and another with Mongo only handling user IDs.
My current strategy is to use Mongo for user accounts and only use it for storing the user id so it can be used to authenticate and allow for easy user create/logins.
Then use any other database on the server (easy with promise enabled drivers) and fetch data from the client with via Meteor methods.
Publications are replaced with a Meteor method with the same signature. It returns the same data that the publication would return. The only difference is that now the client has to manually call it.
However, with Redux this isn’t as big of a deal as it was 1 or 2 years ago. It’s fairly easy to keep track of state and do optimistic updates. To get a reactive UI you just need to long poll the client.
Most apps don’t need tight realtime so long polling ever 30 seconds or min is usually more than enough.
Long polling for 80% of the app may even be more efficient at scale??
If you need a tight real-time feed the
ccorocos:anydb package will let you setup a subscription feed without any clientside stuff.
I really hope I don’t need to keep swapping out parts of Meteor to keep up with the industry standard… I love Meteor I just wish it wasn’t constantly 6mo. behind everyone else Once async/await and Falcor mature it’s going to be hard to choose which stack to use.
Links to articles that caused the mongo upset (note i’m not giving up on Mongo because of these, the articles were the start of ‘panic’ that’s causing clients to not want Mongo in their stack):