News for hackers. Stuff that matters.
Re:Choose Boring Technology (2015) by code_duck on Sunday February 21, 2021 @04:42AM (#26212155)
I had a small business depending on the Etsy API during the time they transitioned some storage to Mongo. The immediate effect for us was a downturn in functionality and reliability with no apparent advantages. In the midst of other serious concerns about their direction, we questioned why Etsy was doing this on the API mailing list and were told basically we didn't know what we were talking about and it wasn't out business. Fair enough, sort of.

It was a hot time for NoSQL and document DBs. Having investigated using Mongo myself to little avail, I asked why they didn't just use Postgres. If I recall correctly, a couple years later they published a Mongo at Etsy postmortem which concluded they should have just stayed with Postgres.

Re:Choose Boring Technology (2015) by b0afc375b5 on Sunday February 21, 2021 @05:52AM (#26212484)
For anyone else curious, I found the postmortem here:

https://mcfunley.com/why-mongodb-never-worked-out-at-etsy

Which was compiled here:

https://github.com/icy/w2w

Re:Choose Boring Technology (2015) by Kwantuum on Sunday February 21, 2021 @11:06AM (#26214449)
That repo is interesting. A quick ctrl+F seems to indicate that pretty much every instance of "MongoDB" is "Moving from Mongo to Postrges or DynamoDB" (there is one single entry of moving to Mongo from MySQL). Almost as if Mongo is just not a good database (or people are too eager to use it for things which it does not do well).
Re:Choose Boring Technology (2015) by gravypod on Sunday February 21, 2021 @11:38AM (#26214821)
Making efficient use if mongodb is very difficult but if you build your app and expectations correctly you can get something very performant. For example pre-4.x listing huge collections was unexpectedly extremely slow.
Re:Choose Boring Technology (2015) by chrisco255 on Sunday February 21, 2021 @02:56PM (#26216540)
Yeah Mongo is 10 years old or so at this point. This article was written in 2015 about decisions made years earlier. It's now reached maturity and stability. It's now "boring tech".
Re:Choose Boring Technology (2015) by arcturus17 on Monday February 22, 2021 @06:07AM (#26223147)
It may be more established but it suffers from a similar problem: some people continue choosing it for the wrong reasons, such as "our backend is in JS, most of our devs only know JS, and it's easy to just dump objects in there", which is an abhorrent reason for choosing it, and will end up biting you.

IMO this would be a case where if you're dealing with a relational domain and the engineers really don't know SQL you should either (a) rethink your hiring policy or (b) spend one of your innovation tokens in having everyone learn SQL.

(I have to add the inevitable disclaimer that I actually love JS and do not want my words to be misinterpreted as a cheap dig at it)

Re:Choose Boring Technology (2015) by rvba on Monday February 22, 2021 @05:53AM (#26223050)
Does mongoDB still use math.random to select 10% of errors and only report them, while 90% are ignored? Or did they correct this "behavior"?
Re:Choose Boring Technology (2015) by reasonabl_human on Tuesday February 23, 2021 @10:53AM (#26238702)
Huh? That sounds like crazy talk..
Re:Choose Boring Technology (2015) by Yeroc on Sunday February 21, 2021 @04:32PM (#26217446)
Um, even if it's mature technology that doesn't negate the costs of operating two different databases which is a large part of what the original presentation is about.
Re:Choose Boring Technology (2015) by collyw on Sunday February 21, 2021 @08:45AM (#26213382)
I am left maintaining a mongo db from 7 years ago or so, when NoSQL was peak hype cycle. Like you say it´s crap.
Re:Choose Boring Technology (2015) by NomDePlum on Sunday February 21, 2021 @10:53AM (#26214346)
Lots of good reasons to use NoSQL. All pretty much hang off what sort of data access pattern you need.

If you have an application that retrieves an works on a top level entity then NoSQL fits very nicely. When you have a dataset that is shared and aggregate information is needed not so much and you are likely better of considering a SQL database of some sort.

Re:Choose Boring Technology (2015) by bitwize on Sunday February 21, 2021 @11:34AM (#26214765)
> When you have a dataset that is shared and aggregate information is needed not so much and you are likely better of considering a SQL database of some sort.

There are best practices for this. Simply create a microservice per table, and then create a microservice that acts as a client to the other services and aggregates or joins the data from those services.

No, I'm not kidding. This is literally what people do and recommend.

Re:Choose Boring Technology (2015) by c-cube on Sunday February 21, 2021 @01:46PM (#26215974)
And remember to implement distributed 2 phase commit to guarantee consistency! So much simpler than using old crufty sql
Re:Choose Boring Technology (2015) by bitwize on Sunday February 21, 2021 @02:00PM (#26216102)
Oh, pish and tosh! That's too much engineering! Instead, handwave about "eventual consistency" and save millions in infrastructure costs! Totally worth it for the benefits of being truly abstracted from your data storage layer. Because, you know, people change their database back ends more often than they change their sheets.
Re:Choose Boring Technology (2015) by cosmodisk on Sunday February 21, 2021 @09:48PM (#26220233)
Is this a joke or people seriously do this?
Re:Choose Boring Technology (2015) by bitwize on Monday February 22, 2021 @12:44AM (#26221274)
It's industry best practice -- not a joke. What's more, the recommendation is to have a separate database per service -- one table, one service, one database.

Fuethermore, when a join is desired, the best practice is to implement not just a service that joins the data but maintains it in a table/materialized view of its own, along with a message server such as Kafka. The services responsible for the tables to be joined (customers and orders, for instance) put events on this message bus which the joining service subscribes to in order to know when to update its view. See: https://microservices.io/patterns/data/cqrs.html

And don't get me started on how you do transactions that touch multiple tables in this setup: https://microservices.io/patterns/data/saga.html

I have seen these deployed and advocated as the modern way to write business applications in the wild.

Re:Choose Boring Technology (2015) by collyw on Thursday February 25, 2021 @11:58AM (#26264990)
I bet these people are running on a single server.
Re:Choose Boring Technology (2015) by stepbeek on Sunday February 21, 2021 @11:38AM (#26214813)
This is a good point. If we ignore obvious key-value examples, I’m curious about how much data really isn’t relational.