5 ms·
Since everyone is sharing their opinion and experience with mongodb I think I’ll share mine. As an appeal to authority I would like to mention that I have rele
by dijit 8y ago
Since everyone is sharing their opinion and experience with mongodb I think I’ll share mine.
As an appeal to authority I would like to mention that I have relevant vocational qualifications on the subject (more geared towards scalability and operations). Although I don’t believe it really matters - it will to those who assume I don’t understand best practice.
MongoDB itself is not /really/ a valid choice in many scenarios that it was painted as solving. Their only fault is overzealous marketing, it has (in my opinion) very clear pain points that should be avoided, but those painpoints are antithical to why many people used it in the first place.
Most people pick up mongo because it’s painted as being “beginner developer friendly”, I don’t mean new developers, I mean picking it up and running with it, without understanding it, was made to be incredibly easy. But MongoDB itself needs you to understand your data patterns before you start adding shards, so the technology itself depends on you actually sitting down and designing an architecture while understanding that. These goals are at odds with each other.
In MongoDB (as it was when I was using it in full prod 6+ years ago) you -needed- to understand how your data is going to grow and how it will be queried long before you ever created an index. You could not grow after creation. But using it as a plain document store with no searching and heavy sharding on the document ID is the best way to go. And in that scenario it is much better than most competitors.
In nearly every /other/ scenario its a less favourable choice than another technology of some variety.
I would argue the data loss point but I think if that’s not a solved issue it will be, and I’m fairly certain you can configure it to be slower but correct (my memory is bad).
I am not a MongoDB advocate, nor do I hate the technology outright. I strongly dislike how it was marketed as being a panacea.
And for the same reason I avoid PHP, I will attempt to avoid MongoDB.
(As in; it can be done well but the majority of cases will be poorly implemented)
- bryanrasmussen 8y agoMongoDb's overzealous marketing is like my sending out resumes extolling my skills with C/C++ embedded programming. I guess it's actually lying now that I think of it. People might be justified in being a little bit peeved.
- scarface74 8y agoI’m a big fan of Mongo for the use case you described - searching by ID and all information in one document. But people don’t seem to understand that there are plenty of scenarios where you really either don’t know the schemes in advance and/or the “schema” is defined by an external source. I worked for a company that sold software that allowed users to create forms that could be filled out either on the web or via a mobile app. The user created the form and the schema and the indexes were created on the fly - one collection per type of form. What would an RDMS have bought us?
- felixfbecker 8y agoPostgreSQL's JSON columns are pretty powerful
- scarface74 8y agoAnd the tooling around it? For instance the Mongo C# Linq driver can translate LINQ to MongoQuery.
- SigmundA 8y agoI haven't used myself but have heard good things: http://jasperfx.github.io/marten/documentation/documents/querying/linq/ http://jasperfx.github.io/marten/documentation/documents/que...
- GordonS 8y agoI've been using this in production for around 1 year - it's an absolute dream to use! For context, I've previous experience with NHibernate, EF, EF Core, Dapper and some others from yesteryear - Marten is probably the best dev experience I've had from an ORM.
- mr_toad 8y agoAnd if you create a table with a single ID column and a single JSON column you’ve essentially re-invented a NoSQL database. But I guess you can pretend it isn’t.
- 52-6F-62 8y agoDocuments. You said it there. I work a lot with documents in my current role which includes a lot of JSON structures as well. MongoDB has been immensely useful for a team with limited scope (and requisitional abilities within the organization) to get up and running and store backups of documents that have been processed and JSON API responses. I definitely wouldn’t apply it as a panacea, either. Like any tool, it has it’s place in the belt for me. It’s no universal hammer, though.