Live data from Hacker News

Failing with MongoDB

blog.schmichael.com

91–100 of 128 posts

Re: Failing with MongoDB

#91
post #44

Earlier quoted context omitted.

You say that like it's a failure on the devs' part, but that's kind of like blaming regular users for not switching to Linux because they don't like editing network configuration files.* It's masking the problem that there are real developer-friendliness issues with the existing databases. And taunting users will not get them to switch back. * but then Linux distros get network autoconfiguration and suddenly it's obv…

This is exactly why I do not believe that what we do is engineering. Engineers do not refuse to use proven techniques and technologies because they are "too hard" and instead use easier methods that have serious shortcomings.

How about the freedom/need to experiment?

If MongoDB is popular, it's because it has some compelling features/arguments (I'm not sure of which ones exactly). But classical RDBMS seem to be trying to close the gap.

Re: Failing with MongoDB

#92
post #90

Earlier quoted context omitted.

The effort required to get something like Postgres running in the first place. With Redis and CouchDB, it's juts `sudo pacman -S redis|couchdb`, maybe edit the config file, `sudo rc.d start redis|couchdb`. With Postgres you have to create databases, users, etc. etc. While all this stuff is critical in production, it's really not something that you should have to do to just code some stuff.

Well, this is completely bogus. Setting up a new user on PostgreSQL takes me roughly 30 seconds. Now if you use the stock system-db user mapping for dev environment, it's something you do only when you install your system. Mine has been installed for 3 years now.

The parent is referring to a new user trying to set up postgres.

And in the above Linux networking example, this response is analogous to the person who says "But I wrote my own scripts to fix my ethernet configuration, I don't see what the big deal is!"

Edit: That came off a bit harsh. I just don't think the fact that it's not a hassle for us means it's not a hassle for other people. And I don't think that mongo's easy configuration means that it should be used over postgres in all cases, just that postgres should take notice that people like mongo's easy configuration and step up their game in that department.

Re: Failing with MongoDB

#93

Earlier quoted context omitted.

Better than asking for big pile of money and give back crap and charge way more for fixes isn't it? :)

Yes. But I think asking happy users to donate ultimately produces better code than asking unhappy users to pay for support.

Long run, one wants happy users to donate sales/marketing effort with recommendations, and pay for development of new features.

I'd MUCH rather be paid to produce new features than fix bugs.

Re: Failing with MongoDB

#94
Thank you 10gen+contributors for giving us the first USABLE ALTERNATIVE to the classic SQL world. You're gonna get a lot of crap, because it takes a good programmer to write good client code for MongoDB. [I'm not suggesting that everybody who reports problems with MongoDB is an inferior programmer, so don't downvote me bro!] (I'm looking forward to getting rid of the global-write-lock issue, and I'm sure you are already working on that.)

Re: Failing with MongoDB

#96
post #92
post #90

Earlier quoted context omitted.

Well, this is completely bogus. Setting up a new user on PostgreSQL takes me roughly 30 seconds. Now if you use the stock system-db user mapping for dev environment, it's something you do only when you install your system. Mine has been installed for 3 years now.

The parent is referring to a new user trying to set up postgres. And in the above Linux networking example, this response is analogous to the person who says "But I wrote my own scripts to fix my ethernet configuration, I don't see what the big deal is!" Edit: That came off a bit harsh. I just don't think the fact that it's not a hassle for us means it's not a hassle for other people. And I don't think that mongo's e…

yum install postgresql-server

service postgresql initdb

service postgresql start

sudo -u postgres psql .....

postgres=#.....

If all you are doing is writing code, that's sufficient on an rpm based platform. On Debian, use apt-get instead. On Windows use the 1 click installer.

PostgreSQL comes with a default user and a default database, so the criticism on this thread is a bit..... incorrect.

Now it is true you have to set up a system user if you are compiling PostgreSQL from source. However, that's really optional in most cases unless the code you are writing is, well, a patch to PostgreSQL.......

Re: Failing with MongoDB

#97
post #45

Earlier quoted context omitted.

What about all the time you'll waste debugging your app because you can't make good assumptions about the structure of your data?

Isn't that the same argument some use against dynamic typing in programming languages?

One reason Moose rocks for Perl is it gives you the ability to get some stronger type checking in the dynamically typed language.

So yes, I think dynamic typing can lead to debugging nightmares. It just so happens that often the fact that other factors make up for this in many cases.....

Re: Failing with MongoDB

#98
post #92

Earlier quoted context omitted.

The parent is referring to a new user trying to set up postgres. And in the above Linux networking example, this response is analogous to the person who says "But I wrote my own scripts to fix my ethernet configuration, I don't see what the big deal is!" Edit: That came off a bit harsh. I just don't think the fact that it's not a hassle for us means it's not a hassle for other people. And I don't think that mongo's e…

yum install postgresql-server service postgresql initdb service postgresql start sudo -u postgres psql ..... postgres=#..... If all you are doing is writing code, that's sufficient on an rpm based platform. On Debian, use apt-get instead. On Windows use the 1 click installer. PostgreSQL comes with a default user and a default database, so the criticism on this thread is a bit..... incorrect. Now it is true you have t…

Exactly what I meant. In debian, there is no "initdb" step and the daemon is started when it's installed.

Anyway, people who call themselves ops or devs ought to be able to do that sort of 3 lines operations.

As I said before, it happens once in your product's dev/op lifetime.

Re: Failing with MongoDB

#99
Disclosure: I hack on MongoDB.

I'm a little surprised to see all of the MongoDB hate in this thread.

There seems to be quite a bit of misinformation out there: lots of folks seem focused on the global R/W lock and how it must lead to lousy performance.

In practice, the global R/W isn't optimal -- but it's really not a big deal.

First, MongoDB is designed to be run on a machine with sufficient primary memory to hold the working set. In this case, writes finish extremely quickly and therefore lock contention is quite low. Optimizing for this data pattern is a fundamental design decision.

Second, long running operations (i.e., just before a pageout) cause the MongoDB kernel to yield. This prevents slow operations from screwing the pooch, so to speak. Not perfect, but smooths over many problematic cases.

Third, the MongoDB developer community is EXTREMELY passionate about the project. Fine-grained locking and concurrency are areas of active development. The allegation that features or patches are withheld from the broader community is total bunk; the team at 10gen is dedicated, community-focused, and honest. Take a look at the Google Group, JIRA, or disqus if you don't believe me: "free" tickets and questions get resolved very, very quickly.

Other criticisms of MongoDB concerning in-place updates and durability are worth looking at a bit more closely. MongoDB is designed to scale very well for applications where a single master (and/or sharding) makes sense. Thus, the "idiomatic" way of achieving durability in MongoDB is through replication -- journaling comes at a cost that can, in a properly replicated environment, be safely factored out. This is merely a design decision.

Next, in-place updates allow for extremely fast writes provided a correctly designed schema and an aversion to document-growing updates (i.e., $push). If you meet these requirements-- or select an appropriate padding factor-- you'll enjoy high performance without having to garbage collect old versions of data or store more data than you need. Again, this is a design decision.

Finally, it is worth stressing the convenience and flexibility of a schemaless document-oriented datastore. Migrations are greatly simplified and generic models (i.e., product or profile) no longer require a zillion joins. In many regards, working with a schemaless store is a lot like working with an interpreted language: you don't have to mess with "compilation" and you enjoy a bit more flexibility (though you'll need to be more careful at runtime). It's worth noting that MongoDB provides support for dynamic querying of this schemaless data -- you're free to ask whatever you like, indices be damned. Many other schemaless stores do not provide this functionality.

Regardless of the above, if you're looking to scale writes and can tolerate data conflicts (due to outages or network partitions), you might be better served by Cassandra, CouchDB, or another master-master/NoSQL/fill-in-the-blank datastore. It's really up to the developer to select the right tool for the job and to use that tool the way it's designed to be used.

I've written a bit more than I intended to but I hope that what I've said has added to the discussion. MongoDB is a neat piece of software that's really useful for a particular set of applications. Does it always work perfectly? No. Is it the best for everything? Not at all. Do the developers care? You better believe they do.

Re: Failing with MongoDB

#100

Earlier quoted context omitted.

Yes. But I think asking happy users to donate ultimately produces better code than asking unhappy users to pay for support.

So true. So true. I wish happy users would donate more as well. Unfortunately when happy users get used to the culture of free and good quality software, they started to have a sense of entitlement (instead of donating). That if the software didn't provide exactly what they wanted, they starting to swear and whine instead of being... calm and helpful.

I think a big part of the entitlement problem is not being clear about the business model, or positioning oneself to take advantage of it.

One key thing is, I think, to advertise services and ways of making money. IOW, giving people the option to get new features, etc. is an important thing.

There is a lot of solid FOSS out there: PostgreSQL, BSD, Linux, CUPS, and more all come to mind. These often are less sexy than heavily marketed, inferior counterparts. But these all also have solid business models attached.

I highly recommend that folks who start open source software look around at business models surrounding the better open source products and see what they can do to capitalize on that.

Post reply on HN