News for hackers. Stuff that matters.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by madhadron on Saturday May 23, 2020 @03:44PM (#23285768)
In the circles I run in, MongoDB is regarded as a joke and the company behind it as basically duplicitous. For example, they still list Facebook as their first user of MongoDB on their website, for example, but there is no MongoDB use in Facebook hasn't been for years (it came in only via a startup acquisition).

I had the misfortune to use MongoDB at a previous job. The replication protocol wasn't atomic. You would find partial records that were never fixed in replicas. They claimed they fixed that in several releases, but never did. The right answer turned out to be to abandon MongoDB.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by kyllo on Saturday May 23, 2020 @07:05PM (#23287412)
I was floored by this comment yesterday from one of their Developer Relations people:

> Did any of you actually read the article? We are passing the Jepsen test suite and it was back in 2017 already. So, no, MongoDB is not losing anything if you know what you are doing.

https://twitter.com/MBeugnet/status/1253622755049734150?s=20

Can you imagine saying the phrase "if you know what you are doing," in public, to your users, as a DevRel person? Unbelievable.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by btown on Sunday May 24, 2020 @01:05AM (#23289256)
Generally speaking, there are many levels of “if you know what you are doing.”

- The system warns about unsafe usage at either compile time or runtime, and you ignore at your peril.

- The system does not warn, but official documentation is consistently verbose about what is required for safety.

- Official documentation isn’t consistently helpful and can be downright dangerous, but the community picks up the slack.

- The company gaslights the community into believing it is possible for a non-core-team member to “know what they are doing” from one of the above levels when Jepsen provides written evidence that this is not true.

I’m fine with things that are the third level from the top. I like to live dangerously. But I don’t think anyone can look at that last level and say “people are giving informed consent to this.”

Re:Jepsen Disputes MongoDB's Data Consistency Claims by virgilp on Sunday May 24, 2020 @01:59AM (#23289480)
The problem is that if you know what you are doing (I.e. you configure MongoDB to be safe) you may lose all reason to use it (no longer has the same performance, of course)
Re:Jepsen Disputes MongoDB's Data Consistency Claims by dralley on Saturday May 23, 2020 @11:19PM (#23288805)
That comment wasn't yesterday, it was a month ago. It was actually after that comment that Jepsen decided to retest MongoDB and write this new article
Re:Jepsen Disputes MongoDB's Data Consistency Claims by kyllo on Saturday May 23, 2020 @11:23PM (#23288819)
Ah, good to know. I saw it when someone I follow retweeted it yesterday.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by jen20 on Saturday May 23, 2020 @08:52PM (#23288102)
Firstly let me point out that this response is neither intended as a defence of MongoDB defaults which are atrocious, or of the company, who are arguably duplicitous.

However I can _quite easily_ see how a non-native English speaker could use the phrase “if you know what you are doing” to mean “if you are careful”.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by infogulch on Saturday May 23, 2020 @10:44PM (#23288664)
Even so, they're just implicitly admitting to the very accusations that they are defending. If "running it right" is so insufficiently defined that jespen cannot figure out how to set it up, maybe your product just doesn't actually offer consistency. Sure, you're conceding at a different abstraction level, but it still means that you're failing to solve the problem of consistency for businesses that that want to solve it with your product.

He just replaced "cannot consistently synchronize data" with "cannot consistently deploy a system that can consistently synchronize data". But what's the difference between those statements to people that need to solve that problem? None.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by kyllo on Saturday May 23, 2020 @10:06PM (#23288473)
Perhaps, but the point is, if you're working in DevRel and you think your role is to defend the product from criticism, and you do it by placing the onus on the developer to figure out how to use your product safely, you've totally lost the plot.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by bauerm97 on Saturday May 23, 2020 @10:39PM (#23288644)
Also, if you're a DevRel, maybe you should have strong verbal and written communication skills in the language of your users? Just an idea
Re:Jepsen Disputes MongoDB's Data Consistency Claims by bryanrasmussen on Sunday May 24, 2020 @06:17AM (#23290525)
I think personally it's an abusive tactic on their part, lots of devs are concerned with being smart, by saying if you know what you're doing you can get the insecure ones to shut up.

But obviously it is a tactic of the doomed.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by yellowapple on Saturday May 23, 2020 @09:35PM (#23288317)
"If you are careful you might not lose all your data" doesn't sound very reassuring, either.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by thaumasiotes on Sunday May 24, 2020 @03:44AM (#23289882)
> I can _quite easily_ see how a non-native English speaker could use the phrase “if you know what you are doing” to mean “if you are careful”.

This kind of thing is a scourge. I had a Chinese friend respond to something I said once by saying "that's nice". It looks so innocent... but it's really hard to overlook the fact that "that's nice" is a serious insult coming from a native speaker. I had to ask them to please never use that phrase to me again.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by skywhopper on Sunday May 24, 2020 @08:24AM (#23290999)
Wow! Where are you from that you consider it a "fact" that "that's nice" is a "serious insult"? (I'm genuinely curious... I assume not the US based on the time this was posted?)

To my ear (American who grew up in the South, lives in the Midwest, and works with people largely from the Mountain West), "that's nice" could definitely be used dismissively or sarcastically, but there's any number of ways to say it that are actually sincere and genuine, and I can't imagine a situation in which it would be a "serious insult".

I mean, I can imagine that in a professional setting, if the coworker was saying it with a sarcastic tone or being showily bored or dismissive when saying it, that their behavior might be insulting. But anything can be insulting if it's delivered in an insulting way. "That's nice" has no particular edge to it to my ear.

So I have to assume you aren't American, or that this is a regional thing that I don't have experience with. In any case, your reaction to "that's nice" reminds me of an American friend of mine who moved to London and when her coworkers would ask her if she had a preference about where to get lunch, she would reply "I don't care", which would be totally normal (to me) in the US. But to her British colleagues, that word choice made it a very rude thing to say (the appropriate reply being "I don't mind" to indicate that she didn't have a preference and was willing to go anywhere).

Re:Jepsen Disputes MongoDB's Data Consistency Claims by ghaff on Sunday May 24, 2020 @09:04AM (#23291210)
Language is complicated. Even to your "I don't care" example in the US, it indeed often means "I don't have a real personal preference, so if others do please go ahead and make a reasonable decision and I'll be fine with it." However, in other circumstances, it can mean something more dismissive in the vein of "I don't give an f what you do. Just go away."
Re:Jepsen Disputes MongoDB's Data Consistency Claims by thaumasiotes on Sunday May 24, 2020 @04:07PM (#23294293)
I'm from California.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by pietrovismara on Sunday May 24, 2020 @04:00AM (#23289965)
Did the joke just went over my head or "that's nice" is a bad thing for real?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by conistonwater on Sunday May 24, 2020 @06:03AM (#23290472)
No it's not, it depends mostly on the tone of the voice. It's often enough sarcastic, but really doesn't have to be.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by thaumasiotes on Sunday May 24, 2020 @06:50AM (#23290671)
Tone of voice does not exist in text.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by PedroBatista on Sunday May 24, 2020 @07:16AM (#23290757)
Just like data consistency doesn’t exist in MongoDB
Re:Jepsen Disputes MongoDB's Data Consistency Claims by conistonwater on Sunday May 24, 2020 @07:16AM (#23290762)
Then you have to follow the principle of charity and assume they're being nice.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by cosmodisk on Sunday May 24, 2020 @04:14AM (#23290036)
I think it sits on the same level as ' it's interesting',when 9/10 times you could see that the person who said so is not even remotely interested.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by ghaff on Sunday May 24, 2020 @09:10AM (#23291241)
I'm not sure I agree with that. A lot of the time "interesting" serves as a filler word for "I'm not totally sure what to think about it" or "I'm not ready to articulate in 1000 words why X may or may not be a good approach right now."
Re:Jepsen Disputes MongoDB's Data Consistency Claims by thaumasiotes on Sunday May 24, 2020 @06:49AM (#23290667)
"That's nice" is a way of explicitly stating that you don't care to any degree about whatever the other person just said.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by ghaff on Sunday May 24, 2020 @08:59AM (#23291183)
It's very context sensitive. "That's nice" (with at least an implied exclamation point) can be a literal reaction to something you like. "Yeah, that's nice" as a reaction to a statement/argument can also be the equivalent of "Whatever." i.e. it's stupid but I'm not even going to dignify it with an explanation of why it's stupid.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by dkersten on Sunday May 24, 2020 @07:28AM (#23290796)
What if it really is actually nice?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by thaumasiotes on Sunday May 24, 2020 @04:08PM (#23294305)
"How nice!" is a positive exclamation with minimal wording change from "that's nice".

You can also be explicit about who's being nice. "That's nice of you."

This really depends on what you want to mean by "nice".

Re:Jepsen Disputes MongoDB's Data Consistency Claims by dvfjsdhgfv on Sunday May 24, 2020 @10:18AM (#23291683)
Then you have to struggle to find another word to say that it's nice, remembering that saying "it's interesting" is forbidden, too.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by bryanrasmussen on Sunday May 24, 2020 @06:19AM (#23290532)
I use Great so consistently sarcastic that my kids have unfortunately learned that Great means something not great.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by HelloNurse on Sunday May 24, 2020 @05:00AM (#23290219)
Indirectly stating that they aren't good enough to use MongoDB properly could be offensive for thin-skinned developers, but it's only bad attitude.

I'm much more concretely worried by a software design for which the authors (not hostile critics) consider "if you know what you are doing" an acceptable safety and quality standard for data integrity.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by throwaway_pdp09 on Sunday May 24, 2020 @06:01AM (#23290463)
I've never used MongoDB and hopefully never will, but I have to defend that phrase in the larger context. A great number of programming problems I've seen have been to do with people not knowing what they're doing with complex tools, it really is that simple.

Actual example: a long time ago someone in my company introduced a race condition into their product because they didn't know about transaction isolation levels (or the locking facilities exposed by MSSQL). I can give many more, as I'm sure anybody here can.

All complex tools need large investment in time to understand. I suspect MongoDB's team are using that as an excuse but in general you must jnow what you're doing with any tool.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by HelloNurse on Monday May 25, 2020 @03:27AM (#23298860)
Let's make an analogy. To drive a car one needs to "know what they are doing" to the point that driving licenses are mandatory. Let's consider a common accident type: a collision because you turn but your directional lights remain off.

If it happens because the driver just forgot to signal, it's a mistake and it's hard to blame the car. It's like knowing what transaction isolation levels can be used, but asking for the wrong one or trusting a random default.

On the other hand, if the directional lights remain off despite pulling the lever because the car is in a probably illegal power-saving mode, activated by turning the headlights off, and the driver should have reactivated directional lights with an ambiguously named item in the depths of some options menu, blaming the accident on user error would be very partisan: it's the car that doesn't know what it's doing. It's like figuring out the correct transaction isolation level according to DBMS documentation, asking for it, and expecting it is actually used.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Saturday May 23, 2020 @09:45PM (#23288376)
It’s not that he’s lying. He just has a tenuous arrangement with the truth.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by macintux on Saturday May 23, 2020 @04:18PM (#23286019)
The joke I learned early on: "Migrating away from Mongo is trivial: wait long enough, and all your data will be gone anyway."

I imagine things are better now.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by MrBuddyCasino on Saturday May 23, 2020 @04:32PM (#23286151)
MongoDB: the Snapchat of databases.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by DevKoala on Saturday May 23, 2020 @04:38PM (#23286203)
That’s mean to SnapChat.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by craftinator on Saturday May 23, 2020 @06:43PM (#23287250)
Snapchat at least warns you that your data will disappear.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by zitterbewegung on Saturday May 23, 2020 @09:31PM (#23288287)
Snapchat has disappearing messages as a feature.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by craftinator on Saturday May 23, 2020 @09:34PM (#23288310)
So does MongoDB! It's a feature!
Re:Jepsen Disputes MongoDB's Data Consistency Claims by sairamkunala on Sunday May 24, 2020 @03:42AM (#23289875)
it's documented too. as per the dev rel's tweet.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by bryanrasmussen on Sunday May 24, 2020 @08:06AM (#23290920)
it's documented, if you know how to read!

on edit: between the lines.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by dkersten on Sunday May 24, 2020 @07:31AM (#23290807)
“Does your database have snapshot isolation?” “No, we have snapchat isolation!”
Re:Jepsen Disputes MongoDB's Data Consistency Claims by darkarmani on Sunday May 24, 2020 @02:37PM (#23293554)
I just call it a probablistic datastore.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Saturday May 23, 2020 @09:43PM (#23288365)
They’re not.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Monday May 25, 2020 @12:15AM (#23297735)
Let’s hope the data disappears after you’ve collected revenue but before you paid the expenses. Crap product, shady company, sleazeball salesforce.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by chx on Saturday May 23, 2020 @04:54PM (#23286339)
There was a time when I advocated for MongoDB with the usual caveats. The ability to easily store and index complex data was of great value. And then in 2015 October, within a week of each other, SQLite and MySQL both learned how to index on expressions and store JSON (SQLite 3.9 2015-10-14, MySQL 5.7 2015-10-21). PostgreSQL added jsonb the year prior in 9.4. At that moment the value of MongoDB for me diminished greatly.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tasuki on Sunday May 24, 2020 @04:10AM (#23290020)
Why is storing json in a database important to you? Whenever I see json fields in PostgreSQL/MySQL, I know I'm most likely in for inconsistent data and a world of pain.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by dkersten on Sunday May 24, 2020 @07:36AM (#23290828)
I use json (in postgres) for user generated config data (that is, both the schema and the values of the config are user generated). I will never query it other than to read the entire data to send elsewhere for processing and write it when the user sends new data. I don’t know or care about the content, since I can’t know what’s going to be there, but if I ever did want to query inside it, postgres allows that.

I could store it in a table with key and value columns, but since I always use it together as one thing, I don’t see the benefit and it just means more rows would need to be accessed.

Maybe its not a good design, but it works well for me and makes my life easier.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tasuki on Tuesday May 26, 2020 @06:36AM (#23309382)
Good use case indeed!
Re:Jepsen Disputes MongoDB's Data Consistency Claims by marcan_42 on Sunday May 24, 2020 @04:32AM (#23290104)
Why is storing all data normalized in a database important to you? Whenever I see an exceedingly complicated database schema, I know I'm most likely in for unfixable legacy DB warts and incessant schema updates for every little feature.

Hyperbole aside, the best option often is somewhere in between. I find that a relational database with columns for primary keys/relations/anything used in WHERE statements in the normal application path, and a json blob for everything else that's just attributes for the current row/object/document, makes for a very flexible and successful DB schema. You get all the strong relational consistency benefits of traditional schemas, plus the flexibility to add and modify features that don't require relation changes without touching the schema, and the ability to represent complex structures while still allowing ad-hoc and admin path queries to peek into them where necessary.

In fact, most "fully normalized" databases end up reimplementing a key/value store or twelve in there anyway (e.g. config settings, user attributes, and the like). Might as well just use JSON at that point.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tannhaeuser on Sunday May 24, 2020 @06:45AM (#23290645)
Are you saying fully normalized RDBs end up reimplementing key/value stores, and then suggest to just use a JSON blob instead? The reason why RDBs are normalized is to avoid update anomalies, and it isn't really difficult to understand. Technically, adding a column to a DB table is a matter of "ALTER TABLE T ADD (mycol NUMBER)", but it sounds like the real problem to be worked on is the organizational overhead going on. At least the way you're describing your use of JSON blobs in a relational DB really sounds like a guerilla tactic to sidestep DBAs gatekeeping your DB. JSON is just an accidental data serialization format supported by browsers OOTB. If you're using any other language in your backend, like Java, then you need additional serialization libs to read and write JSON anyway (like with every other format such as XML), and the convenience of JSON is lost. Though lately browser apps become so bloated with MVw frameworks and whatnot, I wonder if the original point of using JSON - that it can be handled as JavaScript object literal OOTB - is really all that important. If you've worked with MongoDB, you'll know that Mongo's JSON is not quite JSON, but uses additional ad-hoc constructs to re-introduce some typing (such as for dates and IDs).

So I have to agree with GP wondering why JSON is so important to people, and is even portrayed as a relief or saviour to developers. In my experience, JSON in a relational DB is always a sign of organizational failure, developers using the wrong tool for the job, or not knowing what they want or do.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by marcan_42 on Sunday May 24, 2020 @08:56AM (#23291164)
I'm not sidestepping the DBA, because I'm the DBA :-)

Fully normalized databases are a nice academic idea, but the supposed benefits of going all the way don't materialize in the real world. That kind of approach is just old school cargo cult - just like full NoSQL is new school nonsense. Good developers know that the answer isn't to use whatever was the fad was when they were in school, be it fully relational databases or NoSQL or anything else, but rather to look at the available technologies and take the most appropriate bits and pieces in order to make a project successful.

After all, if JSON were nonsense, why would a serious relational database like PostgreSQL be adding full support for it? They know it has good use cases.

I know it has full use cases, so I use it, along with proper primary and foreign keys and a properly relational base data model. Yes, all my primary objects are tables with proper relations and foreign keys (and a few constraints for critical parts; not for everything because 100% database side consistency is also an impossible pipe dream, as not every business rule can be encoded sanely in SQL). Just don't expect me to add a user_attribute table to build a poor man's KVS just because people in the 90s thought that was the way to go and databases didn't support anything better. I'll have an attributes JSONB column instead.

And yes, JSON is just a trivial data serialization format that happens to have become de facto. It has an intuitive model and the concept isn't new. It just happens to have been what became popular and there is no reason not to use it. Keep in mind that PostgreSQL internally stores it in a more compact binary form anyway, and if clients for some programming languages don't yet support skipping the ASCII representation step that is an obvious feature that could be added later. At that point it ceases to be JSON and just becomes a generic data structure format following the JSON rules.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by HelloNurse on Sunday May 24, 2020 @05:15AM (#23290277)
It really depends on applications. In most databases I've seen, if information is unimportant it is just omitted and if it's important it's worth putting in a proper column to allow relational operations; and if important information is big it's usually unstructured or ad-hoc (e.g. log messages, PDF documents), not a "document" and particularly not JSON.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by marcan_42 on Sunday May 24, 2020 @07:12AM (#23290745)
I disagree. Most of the information in a database is not something I'd want to query by (otherwise I'd be indexing every column, which I'm not), certainly not as part of the normal application.

What's the point of putting, say, every single user management field into columns in a "users" table? The regular application is never going to have to relate users by their CSRF token, or what their UI language is, or any of the other dozens of incidental details associated to a user, some visible, some implementation details.

What matters are things like the username, email, name - things the app needs to actually run relational operations on.

If you look at any real application, pretty much everyone has given up on trying to keep everything relational. That would be a massive pain in the ass and you'd end up with hundreds of columns in your users table. You'll find some form of key/value store attached to the user instead. And if you're going to do that, you might as well use a json field.

And if you do use a json field with a database engine that supports it well, like PostgreSQL, you'll find that it can be indexed if you need it anyway, and querying it is easier than joining a pile of tables implementing a KVS or two. Because yes, I might want to make a report on what users' UI language is some day, but that doesn't mean it has to be a column when Postgres is perfectly happy peeking into jsonb. And I don't need an index that will just cause unnecessary overhead during common update operations that don't use it, when I can just run reports on a DB secondary and not care about performance.

I designed an application in this manner and it has turned out exceedingly well for me. We have only had about a dozen schema changes total across the lifetime of the app. One of them involved some JSON querying to refactor a field out of JSON and into its own table (because requirements changed) and that was no problem to run just like any other database update. If we need to move things to columns we will, but starting off with an educated guess of what will need to be a column and dumping everything else into JSON has undoubtedly saved us a lot of complexity and pain.

One of our tables is just a single primary key and then a json blob. It stores event configuration. Why? Because it's always loaded entirely and there is never any reason to run relational ops on it. It's a huge json blob with lots of little details, only edited administratively, with nested fields and sub-fields (which is way more readable than columns, which are a flat namespace), including a sub-document that is actually a structure that drives generation of a pile of HTML forms. If I'd tried to normalize this I would have ended up with a dozen tables, probably more complexity than the entire rest of the DB, and a huge pile of code to drive it all, and every single application change that added an admin knob would've had to involve a dabatase schema change... All for what? Zero benefit.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by jeltz on Sunday May 24, 2020 @08:11AM (#23290942)
I use it for when I get extra feilds from a third party API which our system does not need at the moment but which may or may not become useful in the future. Sometimes these extra fields are undocumented so creating columns for them would require investigation, just throwing them in there as JSON is a much better use of my time.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tasuki on Tuesday May 26, 2020 @06:36AM (#23309385)
Also good use case! :)
Re:Jepsen Disputes MongoDB's Data Consistency Claims by chx on Sunday May 24, 2020 @01:23PM (#23293016)
> Why is storing json in a database important to you?

I don't need JSON per se, I want to store data with a predefined, recursive format which most of the time will be just serialized / deserialized but occasionally also queried without having any idea ahead of the time what the query will be. For all I care, it could be Python pickle, PHP serialize, XML or whatever ungodly format you want as long as the above stands. (XML actually works in MySQL thanks to ExtractValue and UpdateXML but alas, I break out in rashes when I touch XML :P)

Let's say you want to display a page of text and images. (Doh.) But you want to give your authors great flexibility and yet nice styling so you give them components: a rolodex, a two-by-two grid, tab groups and so forth (we have 44 such components). This stuff is recursive, obviously. Are you going to normalize this? It's doable but a world of pain is an accurate description for the results. The data you get back from deserializing JSON should map pretty well to the templating engine.

Rarely you want to query and update things, some analytics, some restructuring etc. If it were just a key-value store with page id and serialized data the only way to do maintenance would be to deserialize each page and manually dig in. Sure, it's doable but having the database do that is simply convenient. That's the reason we use database engines, right? At the end of the day, you don't need SQL, you can just iterate a K-V store and manually filter in the application in whatever ways you want -- it's just more convenient to have the engine do so. Same here. The nicest thing here is that if someone wants ongoing analytics you actually can add an index on a particular piece in the blob and go to town.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by coolgeek on Sunday May 24, 2020 @12:18PM (#23292534)
Inconsistent json data is exactly why you use a json data type or database.

I know that you, dear developer, would never produce inconsistent data. But lots of other developers do.

It is often the case that you will need to query that inconsistent json data, but either the pain is too great, or the value too low, to normalize that data. Thus, you dump it as is into a json field or database.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tasuki on Tuesday May 26, 2020 @06:55AM (#23309521)
Ah, well, I guess I prefer having consistent data. The only way to have consistent data is to forbid the database from representing inconsistent states. If inconsistent states are allowed, they will appear.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by ashtonkem on Saturday May 23, 2020 @07:11PM (#23287459)
Every single time I've had to work on top of a Mongo cluster, it has gone into "three stooges" mode, where each node insists that one of the others is master.

I pretty much refuse to deploy a new instance of it now, I've been burned too often.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by DonHopkins on Saturday May 23, 2020 @09:22PM (#23288237)
"I'm trying to sync, but nothing happens!"

https://www.youtube.com/watch?v=mlejsgxOxrU

Re:Jepsen Disputes MongoDB's Data Consistency Claims by kipply on Saturday May 23, 2020 @09:32PM (#23288295)
Tangentially related their sales strategy is questionable.

As an intern at Shopify, I got an email from MongoDB asking us to switch. Shopify was 10 years old the time. Plus several coworkers would also receive similar emails two years later (and some in between of course).

I have a shirt from MemSQL that says "Friends don't let friends NoSQL" and I wear it proudly.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by square_usual on Saturday May 23, 2020 @11:10PM (#23288776)
If their sales team is sending emails to interns, their strategy is very questionable indeed.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by penagwin on Saturday May 23, 2020 @11:31PM (#23288849)
I don't know any details here, but it might have been just one of those "hey <developer position> we'd love to show you how <product> can help you save <time/money/both> - contact us for a demo " kinda things which wouldn't be too weird.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by kipply on Saturday May 23, 2020 @11:45PM (#23288909)
There was a custom blurb about Shopify and talk about "adoption" and alignment with my team, along with a followup email when I didn't respond. Weirder part was that my email wasn't public (but guessable, first.last@shopify) so they must've gone through some manual process to find people to contact
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Monday May 25, 2020 @12:17AM (#23297748)
They will happily waste the time of anyone willing to take a call. They are so sleazy they make Oracle look clean.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by icedchai on Saturday May 23, 2020 @09:03PM (#23288155)
Isn't it amazing MongoDB is a 12 billion dollar company? Someone is using it and actually paying for it, even though it's not any of the developers you or I know.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Saturday May 23, 2020 @09:46PM (#23288380)
It’s the switching costs to get rid of it...
Re:Jepsen Disputes MongoDB's Data Consistency Claims by vosper on Sunday May 24, 2020 @12:58AM (#23289223)
Can confirm: stuck on MongoDB. Paying them for hosting is one less pain.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Sunday May 24, 2020 @01:02AM (#23289245)
That’s like giving the heroin dealer your ATM card.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by sneak on Saturday May 23, 2020 @04:58PM (#23286373)
I run in two circles: the one you mention, but also the other: I have gotten pushback from people (usually devs at clients of mine) for saying it’s lunacy to run a real, actual business on Mongo. (This has always happened from orgs with <10TB of data in the database.)

You’d be astounded how common it is at so-called “enterprise” startups. It blew my mind.

A lot of people simply never went through the LAMP stack days and have little/no experience with real databases like Postgres (or even MySQL). It’s disheartening.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Saturday May 23, 2020 @09:43PM (#23288363)
I have found their salespeople to be the most sleazy and unethical of any that I’ve worked with. Much worse than all the other database vendors combined.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by callalex on Saturday May 23, 2020 @11:13PM (#23288785)
I know they are trying to beat Oracle in this sector, but I didn’t realize they meant it like this!
Re:Jepsen Disputes MongoDB's Data Consistency Claims by serkanh on Saturday May 23, 2020 @10:30PM (#23288598)
Cant agree with this more! I have never met any sleazier sales reps than MOngodb.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mathattack on Sunday May 24, 2020 @01:01AM (#23289243)
Try their managers.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Saturday May 23, 2020 @05:26PM (#23286625)
I got my pm friend prototype his idea on mean stack, but when we got more serious, immediately transitioned to postgres and started using sequelize as the orm. Pretty good decision so far. I don't think they will have cases that won't scale with orm for foreseeable future.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by PacifyFish on Saturday May 23, 2020 @07:21PM (#23287532)
How do you manage dev vs prod instances with sequelize? Specifically, do you use migrations for your local dB or just force sync it?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Saturday May 23, 2020 @07:55PM (#23287748)
they use sequelize migrations for now, eventually we may want to go to something more advanced. take a backup, apply migrations has worked so far. force sync extremely harmful, sequelize is terrible for not being able to incrementally do schema changes. I don't think it can actually add a column, for example.

For us, as a result, it means anytime we add a new model or change a table, we write the table definition in more verbose api, and sometimes resort to sql commands for adding things like defaults in the migrations. (sequelize for some reason can not specify uuid default value for postgres, for example, so we set a default ourselves, even though we don't need one as we have time dependent uuid generator on the client to help with indices).

We kind of learned working around sequelize shortcomings :)

I am still looking for a tool that'd make incremental backups on postgres easier than it is, but for now things are ok.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by AmericanChopper on Saturday May 23, 2020 @11:53PM (#23288939)
Sequelize documentation is pretty bad for some of this stuff, but it has the functionality you listed. You can give Postgres a default uuid by setting the column options to ‘new Sequelize.UUIDV4()’, and queryInterface supports add, remove and change column.

The biggest annoyance I had with migrations was anything that needed a model to be defined inside the migration. I eventually gave up on that and just wrote my own scripts to work around it. But perhaps I just wasn’t persistent enough...

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Sunday May 24, 2020 @12:10AM (#23289009)
I am not super sure, but i remember trying this, and it did not work insides migrations :(
Re:Jepsen Disputes MongoDB's Data Consistency Claims by AmericanChopper on Sunday May 24, 2020 @12:17AM (#23289034)
You might be right. It's quite a while since I was working on that project, and now I'm starting to doubt how sure I am about this...
Re:Jepsen Disputes MongoDB's Data Consistency Claims by OOPMan on Sunday May 24, 2020 @12:18AM (#23289039)
As a skateboarder I've always found the name itself rather amusing as the term mongo has relatively negative connotations in skating.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tincholio on Sunday May 24, 2020 @03:25AM (#23289813)
It also does in Spanish, it's a (rather old, but still used) shortened version of "retard" (from "mongólico", originally used to describe people with Down's syndrome).
Re:Jepsen Disputes MongoDB's Data Consistency Claims by morelisp on Sunday May 24, 2020 @05:36AM (#23290367)
This is true in virtually all languages, as John Langdon Down used it to refer to the syndrome he first characterized, that today instead bears his name.

https://en.wikipedia.org/wiki/Mongolian_idiocy

Re:Jepsen Disputes MongoDB's Data Consistency Claims by mr_gibbins on Sunday May 24, 2020 @05:17AM (#23290291)
Lose the O and it's also a nasty piece of British slang meaning the same thing.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by jwdunne on Sunday May 24, 2020 @05:26AM (#23290324)
It’s funny. Someone I used to know from Scotland is/was a software tester by day. She went mental about the name of their companies new DB. All over social media. “Derogatory, backwards”
Re:Jepsen Disputes MongoDB's Data Consistency Claims by danielscrubs on Sunday May 24, 2020 @04:51AM (#23290177)
Same in Swedish
Re:Jepsen Disputes MongoDB's Data Consistency Claims by HelloNurse on Sunday May 24, 2020 @05:17AM (#23290288)
Same in most languages, but there's also Emperor Mongo in Flash Gordon stories, definitely alluding to Mongol conquering hordes.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by danielscrubs on Sunday May 24, 2020 @04:15PM (#23294346)
Most languages would be a stretch, there are over 7000 languages in the world.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by polote on Saturday May 23, 2020 @06:40PM (#23287223)
Nobody seems to like it. Someone has any idea on why the company still has their revenue increasing ?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by squeaky-clean on Saturday May 23, 2020 @07:16PM (#23287501)
I like it, but I don't really really chime in on threads where it's mostly Mongo bashing and jokes, and I'm guessing others who like MongoDB do the same.

But I'd think MongoDB the company increasing in revenue isn't totally related to the quality of MongoDB the database. In fact a lot of their products seem to be targeting the "I don't want to learn how to set it up and understand indexes" crowd.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by vosper on Sunday May 24, 2020 @12:59AM (#23289231)
Which is funny because one of the things hosted Mongo will do is constantly send you automated emails suggesting that you should create indexes (for tables that MySQL or Postgres would laugh at)
Re:Jepsen Disputes MongoDB's Data Consistency Claims by neeleshs on Sunday May 24, 2020 @02:19AM (#23289574)
Sends emails when scanned vs returned record ratio is greater than a threshold. Not quite sure how something like this would be different for MySQL/postgres. If an index is missing for you query pattern, wouldn't you create an index in MySQL/postgres?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by Xylakant on Sunday May 24, 2020 @04:18AM (#23290052)
> If an index is missing for you query pattern, wouldn't you create an index in MySQL/postgres?

No. I’d consider adding an index. An index is not free, it comes at a cost and that cost may well be higher than the costs of not having that index. For example, if a reporting query that runs once every few hours is lacking an index, the cost of updating that index on every write (and the disk space/memory used) may well exceed its benefits.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by squeaky-clean on Sunday May 24, 2020 @06:56AM (#23290681)
Exactly this. If you connect to your database and run a couple un-indexed queries to explore your data, any query which takes over 100ms will appear for the next 30 days in the "Performance Advisor" tab and it will offer you indexes to create targeted at that query. Just based on a query you did manually one time.

Just to note, this is referring to the features for a hosted databased on cloud.mongodb.com, and not something built into MongoDB the database.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by neeleshs on Sunday May 24, 2020 @12:49PM (#23292757)
I prefer this being shown in the slow queries over not showing it at all , from my experience from people running bad queries manually on production MySQL instances and starting a domino effect.

I guess to each their own.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by lmm on Sunday May 24, 2020 @05:12AM (#23290270)
Secondary indicies can be a lot cheaper in a non-ACID database, where you can acknowledge a write when it is durably committed but index updates may not have completed.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by neeleshs on Sunday May 24, 2020 @12:42PM (#23292693)
Agreed, but a notification about a potential performance issue is not forcing anyone to add an index.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by vosper on Sunday May 24, 2020 @05:36AM (#23290369)
My claim isn’t that indexes are a bad idea. The comment I replied to suggested that Mongo’s marketing targets people who don’t want to learn how to use indexes; my claim is that the reality of the hosted product is that it frequently suggests that you add indexes (presumably doing so helps with Mongo Corps hosting margins, as well as with performance [which is laughable even with indexes])
Re:Jepsen Disputes MongoDB's Data Consistency Claims by squeaky-clean on Sunday May 24, 2020 @06:27AM (#23290565)
> my claim is that the reality of the hosted product is that it frequently suggests that you add indexes

But it auto-suggests what index to use and has a button for you to immediately apply it. I'd say it definitely intends for you to avoid learning how indexes in MongoDB work. The index suggestions it makes are often terrible.

> performance [which is laughable even with indexes]

It really depends on your use-case and how you can structure and query your data. For one such service I'm the lead on I haven't found anything faster that doesn't sacrifice the ability to do more generic queries when we occasionally need to. (Yes we've benchmarked against postgres json fields which is always everyone's first suggestion)

Re:Jepsen Disputes MongoDB's Data Consistency Claims by vosper on Tuesday May 26, 2020 @07:32PM (#23317676)
> But it auto-suggests what index to use and has a button for you to immediately apply it. I'd say it definitely intends for you to avoid learning how indexes in MongoDB work. The index suggestions it makes are often terrible.

Heh, yeah, you're right. So I guess it's the worst of both worlds: they try to not have you learn about indexes, but they give you terrible index suggestions, so when those don't work out you still end up having to learn about indexes :)

Re:Jepsen Disputes MongoDB's Data Consistency Claims by Too on Sunday May 24, 2020 @04:18AM (#23290053)
MSSQL can automatically create indexes for frequently run queries, instead of sending emails about it.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by mikekchar on Sunday May 24, 2020 @05:29AM (#23290342)
I have a legacy app that uses CouchDB under the hood. It's not actually appropriate for how it's being used, but I can see how it could be used in an appropriate way. Over time I got to respect and even like CouchDB (just not the way we're using it ;-) ). However before CouchDB apparently we started with MongoDB and then migrated to Couch after problems with data integrity in Mongo (this was a long time ago and I've heard that problems that we had have been fixed).

But I've always been curious: as a person who like MongoDB, do you have an opinion about Mongo vs. Couch? Keep in mind that you don't have do convince me that there are niches where that style of DB is appropriate ;-) I'm mostly just interested in the comparison since I've never spent any time looking at MongoDB.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by squeaky-clean on Sunday May 24, 2020 @06:46AM (#23290653)
IMO, MongoDB is really good if all your indexes and your data (after sharding) can fit in memory, and you need queries that are a simple match query against a small number of keys or a range query against a date or float type. And also your data doesn't fit into a row/column structure very easily (otherwise go SQL). The aggregation framework, joins, other features are all nice to have for occasional use, but you can't be doing those 10k times a second.

It's great for things like a realtime layer of some app that merges data with a slower and more historical layer of data running on a SQL engine or something safer. Or for services that provide realtime or recent-time analytics, while storing your historical data somewhere else (see any patterns here so far? :P ). In my case the main usage is for an advertising bid and content serving engine, which was pretty much the ideal example use-case for MongoDB mentioned in books I read years ago when first learning it.

Just to note, yes the data integrity problems are "fixed", but only if you configure your instances properly and your read and write statements properly. It's not terribly hard to do, but I don't know if I would really go recommending MongoDB for newbies. If you know how to configure it properly for your data-safety needs, and would benefit from being able to have a flexible schema in early development.... I'd still maybe suggest looking at other document DBs unless you need the read/write speed Mongo can give on simple queries (and fresh projects probably do not need that)

Re:Jepsen Disputes MongoDB's Data Consistency Claims by wolco on Sunday May 24, 2020 @12:33AM (#23289100)
I like it as in certain situations.

For situations where you don't know the schema or for different schemas per record mongo is a great place to dump.

For data when you care about speed and don't care about losing some data. Think sending back a game screen when the client moves and requires a redraw. Depending on how fast the screen is changing dropping a screen isn't the biggest deal.

Reporting was a little bit more difficult but somehow rewarding.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by MildlySerious on Sunday May 24, 2020 @08:20AM (#23290983)
Marketing and advertising. They do a lot of it, trying to brand themselves as the core of the modern stack. The same thing they have been doing from the very beginning, when they had no product to back their claims. Reading the comments here, little seems to have changed.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by Thaxll on Saturday May 23, 2020 @10:33PM (#23288615)
Because good engineers don't take for granted what's written on HN and do a thorough evaluation of a product, MongoDB or something else.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by robterrell on Saturday May 23, 2020 @11:56PM (#23288950)
If there's a more thorough evaluation than Jepsen, please let me know.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by dehrmann on Sunday May 24, 2020 @12:46AM (#23289164)
But their marketing team early on was amazing.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by bbulkow on Saturday May 23, 2020 @10:24PM (#23288570)
that acquisition that used mongo got spun off and is now Honeycomb.io . nice people.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by madhadron on Saturday May 23, 2020 @10:42PM (#23288650)
Honeycomb.io is a reimplementation (with some nice additions) of some of Facebook's internal monitoring tools. Mongo was never involved in those tools, as far as I know. I have no idea if honeycomb is using it internally.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by Diederich on Saturday May 23, 2020 @06:01PM (#23286941)
> but there is no MongoDB use in Facebook hasn't been for years

Are you sure?

Re:Jepsen Disputes MongoDB's Data Consistency Claims by madhadron on Saturday May 23, 2020 @10:43PM (#23288657)
Until very recently I worked there, and at once point I dug quite deeply into the company to see if I could find if it was still in use. I couldn't find documents referencing its present existence, packages to install it, or anything else, so I'm pretty certain that it's not in use.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by Diederich on Sunday May 24, 2020 @01:08PM (#23292891)
There are three VIPs actively being used to load balance MongoDB traffic as of this moment.

The docs you likely found on the wiki are dated, but MongoDB is definitely being used in Enterprise Engineering.

Source: I'm currently on the EE traffic team.

It's difficult to make accurate blanket assertions about large technical organizations, which Facebook certainly is.

I am amused by the downvotes that my previous comments received.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tornato7 on Saturday May 23, 2020 @11:39PM (#23288889)
Ah yes, but am engineer at Facebook installed it on his work laptop once
Re:Jepsen Disputes MongoDB's Data Consistency Claims by hypewatch on Saturday May 23, 2020 @06:20PM (#23287072)
It’s certainly not used for any mission critical apps. Facebook’s stack is pretty well known. They’ve been using sharded MySQL for a while now. Instagram started on PostgreSQL but I believe has switched to Cassandra.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by Diederich on Saturday May 23, 2020 @06:23PM (#23287094)
> mission critical apps

Thanks for the clarification.

As an example: would you consider the backend software stack that manages physical access to the campus 'mission critical'?

Re:Jepsen Disputes MongoDB's Data Consistency Claims by dijit on Saturday May 23, 2020 @07:49PM (#23287710)
Ubiquity Edgerouters' management interface has a MongoDB backend and I have one on my desk at work, but I would not consider that I run "MongoDB" to provide services for my customers.

In much the same way I wouldn't say that my site is powered by Microsoft Excel; but you can be sure Microsoft Excel is used in my company.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by penagwin on Saturday May 23, 2020 @11:36PM (#23288874)
I think they mean for first party backend tools. For example at my job I would say we use react in production - not on the frontend, but only for an internal warehouse application interface, nobody outside can use it but it's vital to our business, and we're the ones who built the application.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by hypewatch on Saturday May 23, 2020 @06:29PM (#23287147)
I would not. Facebook.com still operates with or without that system. Especially now with COVID-19, I’m sure it’s not being used at all.

Mission critical - essential for operating Facebook.com

Re:Jepsen Disputes MongoDB's Data Consistency Claims by pandemicsyn on Saturday May 23, 2020 @09:37PM (#23288325)
> I’m sure it’s not being used at all

Is is a company wide system? Its all fun and games until the cooling in a dc starts to have issues and the facilities team can't gain access because....mongo... ?

Re:Jepsen Disputes MongoDB's Data Consistency Claims by toast0 on Saturday May 23, 2020 @07:24PM (#23287545)
Sure, that's mission critical (ish), but it's not really what people think of when they think of Facebook. It's not millions of posts per second, ultra scalable whatever.

Disclosure: I worked at Facebook, but not in that department, or anywhere near any MongoDB.