It helps that I was one of the people who made those decisions at the time, so I know we were making what we thought were the best decisions at the time.
Still wish we had made some different ones, though!
It helps that I was one of the people who made those decisions at the time, so I know we were making what we thought were the best decisions at the time.
Still wish we had made some different ones, though!
I worked at a startup a handful of years ago which decided early on that mongodb was good enough. We figured we'd move to a proper database down the road. Spoilers: That never happened - the longer we used mongo, the more expensive migrating became. We never did manage to justify the migration. As far as I know the team is still stuck with it, and paying the price.
(If you're reading this and you know who you are, I'm sorry!)
http://www.sarahmei.com/blog/2013/11/11/why-you-should-never...
Don’t use it for relational data. Don’t use it as your primary data store.
At the enterprise I work at, I’ve had success delivering features where data science would have some job that aggregates production data and dumps it to kafka. Then we’ll map it and dump it in mongo. Stick a .net core microservice on top for retrieval. Works great, has none of the problems mentioned in that article. Of course, this might not make sense if you’re not big enough to where you need kafka, kubernetes, etc
But “Never use it” is certainly not good advice.
How can you know if your decision is correct if you never use it in the first place. Isn't it like only implementing A version of A/B and concluding that not implementing B version was a good decision.
> What’s missing from MongoDB is a SQL-style join operation, which is the ability to write one query that mashes together the activity stream and all the users that the stream references. Because MongoDB doesn’t have this ability, you end up manually doing that mashup in your application code, instead.
Even with a normalized relational database one wouldn't make a single query to return rows from a join of tables T1, T2, T3, etc when there are repeating relations such as the users in the social graph. This might be done sometimes paying for the duplication to save a network round trip, that's all and no different.
> Users have friends, friends have posts, posts have comments and likes, each comment has one commenter and each like has one liker.
I would likely gather all the instances of User id in each context (user, friend, commenter, and liker) and query it separately from the JOIN query. Depends on your data which way works out better on average/worst-cases.
Yeah, that can't end well. It's a bit ironic from parent poster's viewpoint but "boring", well-understood technology is generally also the easiest to migrate away from. That's one key reason to choose it at the outset even over more "innovative" and perhaps more "ergonomic" choices like mongo, that in reality aren't nearly as simple to deal with.