by alexashka · 5y ago · 0 comments
It goes to show that HackerNews consensus != reality.
I do wonder where/how Mongo makes their money - if anybody has some insight, please share.
Edit: Mongo is a special kind of lock-in: your code ends up so much more tightly-coupled, and hard to extricate, because of the Mongo pattern of making you do the work to ensure consistency and correctness. I can’t imagine it was planned, but it’s highly effective: for many companies it’s just too much work, too expensive, and the benefits are too opaque (“but the application works now, and you’re telling me you want to switch databases and it’ll take how long?!”) for others to buy into.
I’d call it clever, but I think it’s a profitable accident that’s a braking force on the progress of many teams.
And it is it not just me and my friends -- HSBC recently announced they are moving 65 of its relational databases to mongodb. I am not sure that is wise, but I think it furthers my view that data-loss is not a concern in many contexts.
The data-loss thing was most certainly real, but has not been since wiredtiger if one manages it the right way or uses it as a service.
I would not say that I would say that HN != reality, maybe !== reality :). Neither side of the debate is wholly right, and neither is wholly wrong.
The reason I use it is that for many projects, all you need is a relatively fast JSON document store, and mongo is so developer-friendly such that speed-to-prototype is so much shorter than anything else I have used in 25 years of building database-backed applications. Rethink was the only product that I would have used in its place and I was extremely sad to see it go. I agree with the commenter elsewhere in the belief that it would have thrived had it survived. I was using it for my personal/learning projects and was ready to switch everywhere.
We have stuck with Mongo in production for a few products, one relatively large, and I think if you have separated your concerns well-enough, it is okay developing in Mongo while leaving yourself a path to postgresql or something else. You need to prove, first, that the thing you are building is useful, and Mongo will let you get to that really fast.
I believe what is happening here is that the happy folks are quiet, and the aggrieved folks' experiences are real but it likely was a bad fit for their particular situation. For the subset of situations where we use it, it has allowed my teams quickly in our experimental work.
All of that said, I work in an innovation space where we throw a lot of things at the wall to see what sticks, and our time-to-prototype is often a few months at most. For us, it has been a godsend, but our situation is rather unique.
-h
And back when I started with it, JSONb did not exist. I would say JSONB was also a godsend though as our roadmaps now have a clear path to something we may prefer later. People up the chain are often terrified when they hear the word "mongo" so the existence of JSONB makes it easier to swap out your layer that handles database interactions.
But the speed advantage really lies in the early-stage prototype development. If I have to do it in postgres, the amount of code necessary up front, when inevitable schema changes happen, etc. makes mongo preferable until things settle down.
But again, it all depends on how well you know the thing up front. If you can anticipate a lot of iteration on the data model as you learn how people use your product, mongo is handy early. If I am given a spec for something where all of the things are known and foreseen, I am going with postgresql.
I assume that the hardest thing to do is making something people want to use. If I can achieve that with whatever I use, I have some good (and fun) problems on my hands. And it is all about structuring the work so that I am not tied to any database product. I am no longer working on startups with little-to-no funding, so right now I assume AWS or Azure will manage a database better than I can. And I assume new things are always coming.
> Querying is in pure JS, easy to do stuff programmatically.
You mean you do your logic at the application layer? Like if you need X objects and Y objects where Y have an identifier to the X objects they're related to you build them in JS after retrieving them?
What is the difference from getting a json object and doing the "querying" in pure js?
And isn't it easier "programatically" to just join the data at the source?
> But the speed advantage really lies in the early-stage prototype development. If I have to do it in postgres, the amount of code necessary up front, when inevitable schema changes happen, etc. makes mongo preferable until things settle down.
But again, what is the difference of having a record with a column with json, that you just do rodeo dump?
(I think pg even allows you to do all sorts of indexing on inner fields of json if I'm not mistaken?)
The very RAD reasons you note regarding Mongo also encourage Mongo Cancer (tm).
What is Mongo Cancer you ask? It is the phenomena where Mongo use is manifest from API to home-grown "relational logic" in business tier. This simply doesn't happen with any other NoSQL DB afaik, but Mongo Cancer uniquely marches right up to the user's face in the API.
> I think if you have separated your concerns well-enough, it is okay developing in Mongo while leaving yourself a path to postgresql or something else.
I'll hold you to that "I think" and assume you have never actually done this.
Because Mongo Cancer patients typically love the RAD aspect of grabing JSON hot off the http stack and shoving it in the "database", touching every API in the way. The last M.C. project I saw required effectively a rebuild to actually swap the misused Mongo.
tldr; Mongo Cancer is very easy to catch but requires very expensive surgery to cure.
I do not think the "cancer" metaphor is valuable here. What you describe are bad ideas that I agree are bad ideas but really one has to know the tool they are using and what it is bad at.
I think the thing you describe can happen but that is just poor planning more than anything. Why does the database have anything to do with the design of your API layer? That sounds bonkers. And I would not blame the underlying database tech. I would blame the implementer.
But really, please consider that many of us have, or are as we speak, losing loved ones to a deadly sickness which you have compared to a poor database implementation.
> But really, please consider that many of us have, or are as we speak, losing loved ones to a deadly sickness which you have compared to a poor database implementation.
Sorry for your loss. Use of the word for non-medical concerns is common. Mongo Metastasis works too.
Again disagree regarding "poor database implementation". Trivializing the "database implementation" is precisely Mongo's value proposition and the very reason they got their market share.
Reality!=Market consensus (startups that lost their data using the first versions of mongo)
More often: HN consensus=Reality
At least ES had the decency to tell you it might lose your data.
- Revenue: Total revenue was $150.8 million in the third quarter fiscal 2021, an increase of 38% year-over-year. Subscription revenue was $144.1 million, an increase of 39% year-over-year, and services revenue was $6.7 million, an increase of 19% year-over-year.
- Gross Profit: Gross profit was $104.7 million in the third quarter fiscal 2021, representing a 69% gross margin, compared to 71% in the year-ago period. Non-GAAP gross profit was $108.6 million, representing a 72% non-GAAP gross margin.
- Loss from Operations: Loss from operations was $58.1 million in the third quarter fiscal 2021, compared to $38.7 million in the year-ago period. Non-GAAP loss from operations was $16.0 million, compared to $14.3 million in the year-ago period.
- Net Loss: Net loss was $72.7 million, or $1.22 per share, based on 59.4 million weighted-average shares outstanding in the third quarter fiscal 2021. This compares to $42.4 million, or $0.75 per share, based on 56.4 million weighted-average shares outstanding, in the year-ago period. Non-GAAP net loss was $18.2 million or $0.31 per share. This compares to $14.6 million, or $0.26 per share, in the year-ago period.
- Cash Flow: As of October 31, 2020, MongoDB had $966.8 million in cash, cash equivalents, short-term investments and restricted cash. During the three months ended October 31, 2020, MongoDB used $8.1 million of cash from operations, $5.6 million in capital expenditures and $1.2 million in principal repayments of finance leases, leading to negative free cash flow of $14.9 million, compared to negative free cash flow of $13.1 million in the year-ago period.
For a dedicated database that has 32 GB of RAM, 8 virtualised CPUs, and only 160GB of storage you will pay $2 an hour! That's $17,520 a year for a database with the same level of compute and far less storage than my laptop.
I realise a big part of their target market is firms who are convinced they either can't hire skilled sysadmins or are convinced their time is worth more than the US President but at $17,520/yr for a tiny database it only takes two or three of those before you could, in fact, hire a full time sysadmin in a cheap location. And there's no way that maintaining these things would require an FTE, it's not even close to being a full time job. So how do the economics of this work out? Can anyone explain to me?
My best guess is that Atlas customers are companies that are totally price insensitive and have some sort of "everything must be cloud managed without exception" rule imposed from the top down. As Mongo is licensed such that only they can run a hosted service, such customers would find themselves forced by internal policy into paying whatever price Atlas charges. This would also explain their very low services revenue. But I don't know that, it's just a guess.
Idk, but maybe the engineers don't fully trust it, so they outsource the liability of running it with some contractual guarantees. And at the moment, this probably looks more fashionable, so no one dares question it in fear of seeming backwards.
Its not a contradiction to dislike mongodb technically well still thinking its a good business.