News for hackers. Stuff that matters.
Re:MongoDB shares jump more than 30% in $192M IPO by mi100hael on Thursday October 19, 2017 @04:13PM (#15511174)
> "Most applications today run on a database technology that was introduced in the 1970s," Ittycheria said. "In the '70s, I was using a rotary phone to have a phone conversation. So people are looking for a modern, scalable and flexible platform."

It's like a weird version of the Turing test where you have to decide whether someone's speaking seriously or in jest when they talk about NoSQL.

https://www.youtube.com/watch?v=b2F-DItXtZs

Re:MongoDB shares jump more than 30% in $192M IPO by SilasX on Thursday October 19, 2017 @05:23PM (#15511661)
"Most spaceflight trajectories are based on physics that was introduced in the 1680s. In the 1680s, we were using slide rules to multiply numbers."
Re:MongoDB shares jump more than 30% in $192M IPO by Florin_Andrei on Thursday October 19, 2017 @09:18PM (#15512910)
Actually they were using logarithmic tables then.
Re:MongoDB shares jump more than 30% in $192M IPO by tlb on Thursday October 19, 2017 @09:22PM (#15512923)
Re:MongoDB shares jump more than 30% in $192M IPO by Florin_Andrei on Friday October 20, 2017 @03:12PM (#15518439)
TIL. Thanks!
Re:MongoDB shares jump more than 30% in $192M IPO by baybal2 on Thursday October 19, 2017 @08:00PM (#15512574)
I wish I can upvote you 10 times
Re:MongoDB shares jump more than 30% in $192M IPO by Jach on Thursday October 19, 2017 @04:34PM (#15511332)
I'm continuously amazed when I hear about mongodb in use. Not over say postgres, I get that there are nosql advantages, but over literally any other nosql option.

https://en.wikipedia.org/wiki/Poe%27s_law is the term you're looking for...

Re:MongoDB shares jump more than 30% in $192M IPO by bad_user on Thursday October 19, 2017 @04:44PM (#15511383)
In general NoSQL solutions are optimized for certain use-cases at the detriment of others. If you're looking for a general purpose database, then RDBMSs like PostgreSQL are your best bet.

So that said, when comparing NoSQL solutions, ending up with an apples versus oranges comparison is almost inevitable.

Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Thursday October 19, 2017 @04:59PM (#15511506)
The funny thing is PG will outperform most NoSQL solutions as NoSQL store for vast majority of use cases.
Re:MongoDB shares jump more than 30% in $192M IPO by bad_user on Thursday October 19, 2017 @05:38PM (#15511757)
Well, I for one think PostgreSQL is overrated.

The number one reason for why people want NoSQL is horizontal scaling and for that PostgreSQL is terrible, with all available solutions being hacks that don't work.

Re:MongoDB shares jump more than 30% in $192M IPO by hiram112 on Thursday October 19, 2017 @07:05PM (#15512299)
I don't disagree with you for teams who know which technology is right and which isn't, for their specific use cases.

But more common than not, inexperienced devs are using Mongo and similar to store relational data, simply because they were sold the 'MEAN' stack and didn't realize that, while it's easy to get a quick prototype running, a year or two later you eventually need things like transactions and joins, and NoSQL is absolutely the wrong technology most of the time.

Re:MongoDB shares jump more than 30% in $192M IPO by kod on Thursday October 19, 2017 @06:49PM (#15512209)
Citus works just fine.
Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Thursday October 19, 2017 @06:57PM (#15512253)
what % of people have workload beyond something that PG on i3.16xlarge can handle?
Re:MongoDB shares jump more than 30% in $192M IPO by gaius on Friday October 20, 2017 @02:46AM (#15513938)
I always think this when people talk about scaling. You can buy off the shelf now boxes with 48 or 96 cores, 1-2T of RAM, internal bays for 10s of T of SSD or connect it to an AFA and get 100s of T. This is not even an exotic custom build system, just a commodity, and has been for years. Running a recent version of a conventional database on a box like this goes a very, very long way, with very little hassle because you don't even need to think about "sharding", and you can always add a hotstandby for offloading reads, or for redundancy in another DC, or whatever. Systems like this can quite happily bottleneck on the network before the database starts breaking a sweat.

Remember, sharding isn't scaling the database. Sharding is admitting your database can't scale so you're offloading the problem to another layer.

Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Friday October 20, 2017 @08:22AM (#15515171)
You can have 224 cores and 12TB RAM in a commodity Supermicro box.
Re:MongoDB shares jump more than 30% in $192M IPO by gaius on Friday October 20, 2017 @05:20PM (#15519181)
Indeed. You would need one helluva Postgres workload to overload that. Not one in a million people genuinely have that requirement.
Re:MongoDB shares jump more than 30% in $192M IPO by KallDrexx on Thursday October 19, 2017 @08:54PM (#15512800)
It's also about locality of your data. Having a global infrastructure means 150-200ms minimum latency per query if you have a system in India or Singapore with a database server in a US data center region. That adds up quick.
Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Thursday October 19, 2017 @09:41PM (#15512977)
That is orthogonal concern to what is being discussed if you run geo distributed Mongo cluster you will either have slow queries or will compromise on data integrity.
Re:MongoDB shares jump more than 30% in $192M IPO by KallDrexx on Friday October 20, 2017 @09:19AM (#15515503)
It's not orthogonal because it is harder to have master-master cross data center setups in relational databases even in scenarios where eventual consistency is acceptable (such as a use case for a piece of our infrastructure we have).

Sure MongoDB may not be the best fit for it but my point is more that these are scenarios where horizontal scaling is an important consideration makes more sense for some nosql solutions than for sql solutions. It's not just about single box performance.

Re:MongoDB shares jump more than 30% in $192M IPO by hendzen on Thursday October 19, 2017 @07:39PM (#15512466)
people who don't want to get woken up if Amazon decides to terminate said i3.16xlarge...
Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Thursday October 19, 2017 @08:05PM (#15512595)
Not a fan of AWS or cloud in general but accepted that this the direction the world is going for now. The AWS instance type was purely for illustration purposes.
Re:MongoDB shares jump more than 30% in $192M IPO by jlarocco on Thursday October 19, 2017 @07:51PM (#15512528)
Missed the point completely...
Re:MongoDB shares jump more than 30% in $192M IPO by acdha on Thursday October 19, 2017 @08:20PM (#15512661)
I think you should reconsider that dismissal: everyone needs n > 1 instances for reliability while increasingly few tasks require more {CPU,RAM,IOPs} than a single server can provide. That means that a growing percentage of problems will require clustering for reliability more than performance, and that favors the easiest to manage since in most cases every option will be fast enough.
Re:MongoDB shares jump more than 30% in $192M IPO by gnaritas on Thursday October 19, 2017 @09:28PM (#15512944)
Horizontal scaling is often just as much about redundancy as it is scaling; no one server solution is a valid answer to a production application.
Re:MongoDB shares jump more than 30% in $192M IPO by qaq on Friday October 20, 2017 @06:41AM (#15514766)
People tend to copycat what Google and the like are doing without giving much thought to the fact that in many cases the solutions they adapt are simply due to the fact that they don't have an alternative and not because it's "better".
Re:MongoDB shares jump more than 30% in $192M IPO by fermuch on Thursday October 19, 2017 @05:46PM (#15511806)
I second this. Mongo clusters are easy to manage, and the aggregation pipeline or MapReduce engines do wonders on a sharded cluster with tons of data. That's the selling point of mongo for me.
Re:MongoDB shares jump more than 30% in $192M IPO by ComputerGuru on Thursday October 19, 2017 @08:09PM (#15512616)
It doesn't matter how easy to is to scale if it doesn't do it right. You can win all the internet points when it comes to speed and ease-of-use but it doesn't matter if it comes at the cost of data integrity.
Re:MongoDB shares jump more than 30% in $192M IPO by Diederich on Thursday October 19, 2017 @08:30PM (#15512701)
> It doesn't matter how easy to is to scale if it doesn't do it right.

I would refer you to an earlier comment:

> In general NoSQL solutions are optimized for certain use-cases at the detriment of others

Your definition of 'right' is absolutely not the only definition of 'right'.

More to the point: there are a lot of problem spaces where the data integrity provided by MongoDB are more than sufficient.

Re:MongoDB shares jump more than 30% in $192M IPO by ComputerGuru on Thursday October 19, 2017 @08:48PM (#15512775)
Sorry, I meant "correct" and not "right," as the former is objective and the latter can be (though often isn't) subjective. MongoDB is not correct; in fact, it is provably incorrect. If your needs to don't require correctness, then by all means.
Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @08:40PM (#15512735)
> with tons of data

Define tons of data. I'll bet a beer that what you say can fit on a single postgres instance and even be small enough to run fine on a cheapish developer laptop.

Re:MongoDB shares jump more than 30% in $192M IPO by nicholassmith on Thursday October 19, 2017 @06:06PM (#15511938)
That's interesting to me as I've been looking at Mongo aggregations for a solution to a problem but couldn't find any research on the performance of them.
Re:MongoDB shares jump more than 30% in $192M IPO by pishpash on Thursday October 19, 2017 @05:23PM (#15511670)
NoSQL is optimized for no solutions. You do all the optimizations yourself. Only then are you allowed to speak of "optimized for certain use cases at the detriment of others."
Re:MongoDB shares jump more than 30% in $192M IPO by dplgk on Thursday October 19, 2017 @09:52PM (#15513019)
I can say that CouchDB makes Mongo look like an absolute dreamboat.
Re:MongoDB shares jump more than 30% in $192M IPO by hamandcheese on Thursday October 19, 2017 @04:48PM (#15511416)
Which NoSQL would you prefer over mongo?
Re:MongoDB shares jump more than 30% in $192M IPO by Jach on Thursday October 19, 2017 @05:12PM (#15511593)
Literally any other. I'm unaware of any alternative so unreliable.

But I do think http://www.scylladb.com/ is great.

Re:MongoDB shares jump more than 30% in $192M IPO by qohen on Thursday October 19, 2017 @06:12PM (#15511987)
Literally any other. I'm unaware of any alternative so unreliable.

There was a post on LinkedIn last year, "MongoDB: The Frankenstein Monster of NoSQL Databases"[0], by the CTO of SlamData, which I think produces an analytics package for MongoDB or the like.

The piece is an interesting dive into why MongoDB is what it is (at least as of March 2016) -- and given his connection to MongoDB and its employees -- being a partner of theirs -- it's quite eye-opening (and I'm surprised with almost 200 comments in this thread that no one posted it previously):

Much like Mary Shelly’s Frankenstein monster, MongoDB’s data access layer is sewn together from ragged pieces that don’t fit together. Pieces that were never designed to fit together.

The result, depending on your point of view, is either an Enterprise-grade NoSQL database destined to supplant Oracle, or an unholy abomination of nature, deserving of an angry mob bearing torches and pitchforks.

Let me dissect this creature so you can decide for yourself.

[0] https://www.linkedin.com/pulse/mongodb-frankenstein-monster-...

Re:MongoDB shares jump more than 30% in $192M IPO by qohen on Thursday October 19, 2017 @06:24PM (#15512065)
Another post[0] by the same author complements the one I posted above -- this is more recent and is focused more on MongoDB's moves as a company, relating what he saw at MongoDB World 2017):

You might expect a database company to announce improved scalability, reliability, or performance. Or perhaps announce some of the countless features that users have been requesting for years, which are collecting dust in MongoDB's ever-growing issue tracker.

These are sane, logical expectations for a database company, so you'd be forgiven for being shocked at MongoDB's announcements that the company is investing massively into every product category except database technology.

Yet, to those who know MongoDB's troubled history, these announcements come as no surprise. In fact, I even predicted the launch of Stitch just over a year ago, at the last MongoDB World.

MongoDB didn't start as a database company, it's never acted like a database company, and in my opinion, it doesn't really have the DNA of a database company.

If his assessment in this next snippet is correct, one wonders about those who invested in this IPO:

MongoDB has no ecosystem. There are no analytics tools for MongoDB (except SlamData [N.B. this is the author's company] ), no backup software, no recovery software, no data integration software, no query optimization software, no data management software, nothing. Zilch.

There's just MongoDB.

In hindsight, this is an inevitable consequence of a company without database DNA trying to build and monetize a database. MongoDB couldn't figure out how to build an Oracle-sized empire on a database—partially, I'd argue, because they couldn't figure out how to build a database—yet they have to hit their sales quotas.

If you can't sell the database at scale, you end up trying to build and sell an ecosystem around the database. Slowly, bit by bit, MongoDB went after their early partners, trying to put them all out of business to drive a few million here and there.

The result is a "database company" that sells everything under the sun, including database management tools, data exploration tools, cloud hosting tools, cloud hosting services, and soon, BaaS (Bubble makes a return!) and BI software. Everything except, you know, a database.

[0] https://www.linkedin.com/pulse/mongodb-world-2017-lonely-sto...

Re:MongoDB shares jump more than 30% in $192M IPO by fanbouey on Friday October 20, 2017 @01:45AM (#15513741)
Re:MongoDB shares jump more than 30% in $192M IPO by programmarchy on Thursday October 19, 2017 @05:40PM (#15511768)
Couchbase has a pretty nice mobile sync system, with clients for both Android and iOS.
Re:MongoDB shares jump more than 30% in $192M IPO by HodGreeley on Thursday October 19, 2017 @06:34PM (#15512115)
Just want to note Couchbase is not just for mobile. Couchbase Server is an enterprise-class document-oriented (like Mongo) db with a dynamic query language that's a superset of SQL. (FD: I work for Couchbase).
Re:MongoDB shares jump more than 30% in $192M IPO by revel on Thursday October 19, 2017 @09:13PM (#15512890)
I started a company and chose couchbase. We haven't launched yet, so I've been using the community version and cobbling stuff together.

In this context: please, for the love of God, improve your documentation and dev tools. I love the underlying technology but my experience getting a basic service up and running has been pretty mixed. One of the reasons mongodb has been so successful is that there's 50 bajillion articles showing you how to hack up some crappy code that roughly does what you need it to do. Some of those articles are less bad than others, but in a pinch you can find something to at least get you on the right track. Couchbase doesn't have that deep well of experience to draw on. If you run into a problem, or experience strange behavior, it's up to you to figure out what's going on. That would be ok, but even the official documentation and standard dev tools are not good enough. To get people to adopt couchbase you need to do more to get them started.

Javascript-specific whining: it's particularly frustrating to find an official ODM like ottoman and discover that half the features don't work and that there are tons of bugs that haven't been fixed for about a year. These aren't minor bugs either; some of them stop you using headline features. Forget full text search, N1QL is mostly unusable! Check out ottoman bug #153 for details there.

Re:MongoDB shares jump more than 30% in $192M IPO by fermuch on Thursday October 19, 2017 @05:47PM (#15511815)
The problem I found with couch is handling user permissions at database level. Except for that detail, it's one of the best databases I've ever used.
Re:MongoDB shares jump more than 30% in $192M IPO by programmarchy on Thursday October 19, 2017 @06:01PM (#15511901)
With the sync gateway you get pretty fine grained control. Every create or update goes through a sync function you can define in JavaScript which can deny requests. You can control which users see what by assigning the document to channels. So a user can only pull down documents if that document is on a channel they have access, too.

The issue I've found with the sync gateway is that the queries you can perform are more limited than what you can do directly on a Couchbase store e.g. joining data is difficult.

BTW, Couchbase should not be confused with CouchDB. Similar name and might have some history in common, but Couchbase is more fully featured.

Re:MongoDB shares jump more than 30% in $192M IPO by beamatronic on Thursday October 19, 2017 @06:18PM (#15512032)
Agree, and also I would distinguish between Couchbase Enterprise Edition versus Community Edition.
Re:MongoDB shares jump more than 30% in $192M IPO by milkytron on Thursday October 19, 2017 @05:15PM (#15511611)
Cassandra is a pretty good alternative if you're looking for excellent write speeds and scalability.
Re:MongoDB shares jump more than 30% in $192M IPO by rosser on Thursday October 19, 2017 @06:08PM (#15511954)
We're using Cassandra at scale (~1M concurrent users at peak). It is, in our experience, an absolutely terrible piece of software.

The development community doesn't seem to care about fixing bugs, and when they do fix things, they reliably introduce new, often devastating defects. "Move fast and break things" is unforgivable at the persistence layer. We're stuck using an ancient, unsupported version, because it is, per our empirical testing, the least bad. But we made that choice, and for now we're stuck with it.

Please, let our pain be a lesson to you. I am totally willing to be someone else's "That's how you get ants..." on this point. Our emoji for it in Slack is a burning poo. It's that bad.

EDIT: phrasing.

Re:MongoDB shares jump more than 30% in $192M IPO by KGIII on Thursday October 19, 2017 @10:22PM (#15513135)
I am not a DBA, obviously. I did have to work as one, but that was a lot of years ago. So, pardon me if this is a dumb question.

You say you're stuck with it. Can't you just change a few things, shut down for a little while, export your data, and insert it into a new DB? I know it is hard to do it with writes happening at the same time, but it seems like you could freeze it as read only, extract the data, and put it into a DB that has been prepped ahead of time and tested.

I know we did this more than once BUT it wasn't with public facing data and we were able to migrate while still working on existing data. We just couldn't add more data while doing so.

Re:MongoDB shares jump more than 30% in $192M IPO by rosser on Friday October 20, 2017 @11:54AM (#15516738)
No, it is not that simple. "We just couldn't add more data while doing so" is, by itself, a deal-breaker.
Re:MongoDB shares jump more than 30% in $192M IPO by gerbilly on Thursday October 19, 2017 @08:03PM (#15512590)
>We're stuck using an ancient, unsupported version, because it is, per our empirical testing, the least bad. But we made that choice, and for now we're stuck with it.

Which is this least bad version, if you don't mind my asking?

Re:MongoDB shares jump more than 30% in $192M IPO by rosser on Friday October 20, 2017 @11:56AM (#15516765)
2.2 causes us the least pain.
Re:MongoDB shares jump more than 30% in $192M IPO by munk-a on Thursday October 19, 2017 @06:29PM (#15512093)
I work on more mature projects so I've never used a pure NoSQL environment but I do enjoy working with a split cache/persistence layer approach combining a RBMS (preferring PostgreSQL) behind a cache layer (preferring libmemcached).
Re:MongoDB shares jump more than 30% in $192M IPO by xchaotic on Thursday October 19, 2017 @08:23PM (#15512675)
Marklogic has a much better design when it comes to durability of writes and ACID in general. Disclosure: I work for Marklogic.
Re:MongoDB shares jump more than 30% in $192M IPO by gilbetron on Thursday October 19, 2017 @06:25PM (#15512071)
Druid works far better for our uses.
Re:MongoDB shares jump more than 30% in $192M IPO by newman8r on Thursday October 19, 2017 @06:21PM (#15512051)
I've been enjoying using ArangoDb
Re:MongoDB shares jump more than 30% in $192M IPO by aorloff on Thursday October 19, 2017 @05:16PM (#15511623)
Aerospike for low-latency small row sizes, HBase for everything else.
Re:MongoDB shares jump more than 30% in $192M IPO by mrfusion on Thursday October 19, 2017 @04:18PM (#15511219)
Most vehicles are rolling around on technology that was invented 10000 years ago.

(Is that the same idea?)

Re:MongoDB shares jump more than 30% in $192M IPO by semanticfact on Thursday October 19, 2017 @04:47PM (#15511406)
That's interesting.
Re:MongoDB shares jump more than 30% in $192M IPO by marcosdumay on Thursday October 19, 2017 @05:33PM (#15511724)
Well, the SGDBs of the 70's were nothing like the ones around today.
Re:MongoDB shares jump more than 30% in $192M IPO by blibble on Thursday October 19, 2017 @04:52PM (#15511446)
was it not round?
Re:MongoDB shares jump more than 30% in $192M IPO by tdhz77 on Thursday October 19, 2017 @04:57PM (#15511490)
Firestone recalled those tires in 1999.
Re:MongoDB shares jump more than 30% in $192M IPO by JumpCrisscross on Thursday October 19, 2017 @04:54PM (#15511471)
I guess it didn’t have a hollow core...
Re:MongoDB shares jump more than 30% in $192M IPO by bdcravens on Thursday October 19, 2017 @04:35PM (#15511341)
Meanwhile almost all of those applications are written in languages 20+ years old (Ruby, Java, PHP, Javascript.. Python is almost 30)
Re:MongoDB shares jump more than 30% in $192M IPO by gremlinsinc on Thursday October 19, 2017 @04:39PM (#15511362)
while the languages may be old...they're constantly updated... php 7 is lightyears ahead of 5 and 4 was just a joke.. Python 3 same.. just because somethingn is new/old doesn't make it better/worst I mean - many devs swear by Vim which is like 40 years old.. is sublime text better because it's newer?

(I use sublime..but I admire those who've jumped into vim for the productivity boost that brings).

Re:MongoDB shares jump more than 30% in $192M IPO by callalex on Thursday October 19, 2017 @05:14PM (#15511608)
That’s exactly the point though. It’s not like we’re plopping a floppy from Oracle into every machine running a modern SQL db.
Re:MongoDB shares jump more than 30% in $192M IPO by awj on Thursday October 19, 2017 @04:29PM (#15511293)
> "Most applications today run on a database technology that was introduced in the 1970s. We built ours on ideas that were tried and discarded in favor of that technology."

Not entirely true, but nuance often precludes persuasion.

Many of the ideas behind NoSQL databases can be very valuable, given the right context, but there are a lot of good reasons relational databases have been the de-facto default over the last four decades.

Re:MongoDB shares jump more than 30% in $192M IPO by protomyth on Thursday October 19, 2017 @10:17PM (#15513110)
Worse, the lack of awareness in how a phone system works by picking the phone type as opposed to the actual network is a perfect superficial understanding of technology that dovetails into the video way too nicely.
Re:MongoDB shares jump more than 30% in $192M IPO by quickthrower2 on Thursday October 19, 2017 @05:44PM (#15511798)
Yes dumb argument. That YouTube video was the first thing I thought of when I read the sentence.

Let's scrap everything that was invented in the 70's or before.

Re:MongoDB shares jump more than 30% in $192M IPO by KGIII on Thursday October 19, 2017 @10:25PM (#15513150)
I saw that.
Re:MongoDB shares jump more than 30% in $192M IPO by cortesoft on Thursday October 19, 2017 @05:34PM (#15511734)
Re:MongoDB shares jump more than 30% in $192M IPO by blauditore on Thursday October 19, 2017 @04:28PM (#15511281)
I know there's quite some aversion to NoSQL around here, and generally I don't care much as I'm seldomly dealing directly with databases.

But recently, I've been exposed to a fairly big and complex SQL one with several references between entities and lots, lots of X_has_Y tables. This makes me think that with growing complexity (which seems to be a general trend), NoSQL databases seem more practical at some point, or at least something less rigid than classic relational ones. I'm not saying SQL is obsolete, but it seems like its domain of usefulness is shrinking.

Re:MongoDB shares jump more than 30% in $192M IPO by mi100hael on Thursday October 19, 2017 @04:33PM (#15511328)
I'd argue the opposite is true. NoSQL requires you to be more intentional with your schema design since you can only query keys. As a database grows with complexity, you can find yourself in a world of pain with NoSQL if you all of a sudden need to query something in a different manner. At least with SQL you have more options with WHERE clauses & indexes even if performance might not be top notch.
Re:MongoDB shares jump more than 30% in $192M IPO by HodGreeley on Thursday October 19, 2017 @06:15PM (#15512008)
Not sure of others, but not true with Couchbase. You have queries just as flexible as with SQL.
Re:MongoDB shares jump more than 30% in $192M IPO by philliphaydon on Thursday October 19, 2017 @09:56PM (#15513033)
One of the reasons I love PostgreSQLs jsonb type is you get the power of relational database and power of (nosql?) Document database at the same time. i haven’t run into any query I couldn’t write against a jsonb doc. Granted dot notation on json would be nicer than ‘prop’ > ‘prop’ > ‘prop’, but I don’t feel limited.
Re:MongoDB shares jump more than 30% in $192M IPO by parasubvert on Thursday October 19, 2017 @06:03PM (#15511922)
The point is that the relational model is a fully general purpose mathematical model for managing data with integrity and with ad hock access.

Most other models are for high performance of specific access paths and punt integrity management to code, which is a throwback to the 70s. They’re glorified file systems and data structure caches. Mongo has a reputation for losing your data.

There are cases where scale and availability kills you and you need something like Cassandra or whatnot. But there are few as flexible and general as Oracle or Postgres.

Re:MongoDB shares jump more than 30% in $192M IPO by andrewmutz on Thursday October 19, 2017 @04:41PM (#15511371)
I don't think the HN community is averse to NoSQL solutions, but is averse to MongoDB in particular.
Re:MongoDB shares jump more than 30% in $192M IPO by erik14th on Thursday October 19, 2017 @04:55PM (#15511472)
Everyone here seems to love Postgres and hate on Mongo, I have no technical knowledge to compare the two, so IMO a lot of that love and hate is more towards the "project attitude", MongoDB is a suit, a sellout, with bullshit marketing and all Postgres is like some roots hippie, that cares a lot more about technical values and neglects marketing.
Re:MongoDB shares jump more than 30% in $192M IPO by acdha on Thursday October 19, 2017 @05:03PM (#15511545)
I think most of it was a reaction to the massive marketing push Mongo made. There were so many years of people hyping it as the answer to all of your data storage needs, followed by accounts of users hitting bugs or reimplementing most of a SQL database in code, and the promised performance benefits either didn't materialize or hadn't been necessary in the first place (“web scale” turned out to mean only dozens to hundreds of requests per second for many apps).

Meanwhile, Postgres was quietly plugging away adding new features and continuing to deliver solid performance for a wider range of workloads, including better performance on JSON document storage.

Re:MongoDB shares jump more than 30% in $192M IPO by paulmd on Thursday October 19, 2017 @05:58PM (#15511885)
MongoDB accrued a lot of bad-will due to some extremely questionable defaults, which remain defaults to this day. There's no question that you can write a fast database when there's no guarantee that data ever hits the disk, but developers tend not to like it when a database accepts their write and then silently loses data. It's also great for toy problems and 15-minute-demos... but then you inevitably run into its limitations and end up re-implementing a database in your app.

Even at its best, there is essentially no reason to choose MongoDB over Postgres with JSONB-type columns. They are essentially the same data model but Postgres gives you better guarantees of data consistency, plus a forward migration path to relational data when the day inevitably arrives when you need to model relationships between entities.

At this point Postgres is where most open-source RDBMS development work is concentrated. It's not only a solid codebase, it's piling up features pretty quickly and there are relatively few niches it doesn't fill at least adequately. All of these niches are covered by some commercial products built on top of Postgres (eg EnterpriseDB or CitusDB). It's pretty much a one-stop shop for application development. You can use it for everything from GIS to machine learning [0] pretty efficiently, and it pretty much will just do the right thing without you watching.

NoSQL really fits best around the margins, like as an auxiliary system for analytics. There is really almost no use-case where "user inputs data and we lose it" is an acceptable application behavior, so consistency is a business requirement for your master database whether you realize it or not. And consistency across a distributed system is hard so it almost always makes sense to sidestep clustering until the last possible moment. Buying more machine is cheap, replication/failover is a lot easier than consistency between distributed masters, and if you are really up against the wall there are those commercial products that can do this with Postgres.

If you want to make an analogy... Oracle is the suit, Postgres is the hardworking small business that is slowly but surely eating up Oracle's lunch, and MongoDB is a trustafarian with a hot-dog detector app. And that's why there's a lot of resentment towards MongoDB.

[0]: The 9.x series and 10.0 release have been absolutely jam-packed with new features, it's absurd how fast development is moving at the moment. One of my favorites... indexed cube queries. A cube is a data-cube type, an N-dimensional cube of data. One feature of this is distance queries, which have obvious applications in pattern recognition tasks (eg k-nearest-neighbor). One of the features in 9.6 is index functionality for these, so you can now do indexed KNN searches on your data...

https://www.depesz.com/2016/01/10/waiting-for-9-6-cube-exten...

Re:MongoDB shares jump more than 30% in $192M IPO by porker on Thursday October 19, 2017 @06:49PM (#15512206)
> NoSQL really fits best around the margins, like as an auxiliary system for analytics.

I'd say it also fits well in two niches: document datastores (so long as there's some JOIN support, via referencing nested documents vs direct nesting) and graph stores.

I remember 10+ years ago working on storing nested sets in the RDBMS and it wasn't pretty. And the RDBMS schema for Magento 1, with key-value tables all over the place which NoSQL would have removed the need for.

Re:MongoDB shares jump more than 30% in $192M IPO by paulmd on Friday October 20, 2017 @02:42AM (#15513925)
Can you define what "nested sets" means more specifically?

Postgres supports hierarchical/nested structures using the "ltree" column type. There is nothing stopping you from defining a primary key of (eg) "set1.set10.set100". There is also support for recursive views/etc to operate on these kinds of sets.

Again, if you have some kind of "sparse" column, it can make sense to put that into a JSONB column. This is effectively the same thing as attaching an unstructured document to a record for this use-case.

Re:MongoDB shares jump more than 30% in $192M IPO by porker on Friday October 20, 2017 @03:49AM (#15514167)
Sure: http://mikehillyer.com/articles/managing-hierarchical-data-i...

Joe Celko popularised them. I've been unable to find when they were first introduced; but a search of my source code archive points to having written one ~14 years ago.

Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @08:46PM (#15512763)
> so long as there's some JOIN support, via referencing nested documents vs direct nesting)

Which has its own problems. PG does this just fine, with a full battle-tested relational system to back it (and you) up.

> with key-value tables all over the place which NoSQL would have removed the need for.

Product X having a stupid schema is not a good basis for an argument for or against a particular product.

Re:MongoDB shares jump more than 30% in $192M IPO by porker on Friday October 20, 2017 @03:54AM (#15514194)
> Product X having a stupid schema is not a good basis for an argument for or against a particular product.

What other way could Magento have implemented user-defined columns at the time, using a RDBMS? In 2009 when MongoDB was released, JSON columnstores were something to dream of and the alternative was storing serialised data in a BLOB field. That "stupid schema" did not have an alternative I can think of, except NoSQL.

Re:MongoDB shares jump more than 30% in $192M IPO by VintageCool on Saturday October 21, 2017 @01:44PM (#15522690)
I'm not sure if those were questionable defaults, or questionable design decisions which were the only option at the time, and now persist as questionable defaults.

I'm pretty sure that mmap was the only storage engine available for MongoDB for most of the hype period.

Re:MongoDB shares jump more than 30% in $192M IPO by autokad on Thursday October 19, 2017 @05:06PM (#15511562)
i got downvoted in another thread for saying nosql has a lot of advantages in reducing work like not having to worry about carefully creating indexes when joining billion row tables. someone replied you dont need indexes. i replied I dont know how you plan on running joins on billion row tables in postgress without indexes. got downvoted again.

I bet they are still waiting for that join....

Re:MongoDB shares jump more than 30% in $192M IPO by parasubvert on Thursday October 19, 2017 @06:01PM (#15511900)
Whether you need indexes really depends on what you’re trying to do. Full table scans are more efficient if you are doing analytics on most of those rows in a time series. If you need 1 row in a billion, yes, you need an index.
Re:MongoDB shares jump more than 30% in $192M IPO by autokad on Thursday October 19, 2017 @09:55PM (#15513031)
if your doing a join on two size N tables, your O(n) cost for each record is N, thus you are doing N^2 lookups. basically reading the entire DB into memory each record.
Re:MongoDB shares jump more than 30% in $192M IPO by parasubvert on Sunday October 22, 2017 @06:01PM (#15529200)
No. Worst case a nested join of two tables M and N would be O(MN). But most real databases would have a merge or hash join which could bring this down to O(M+N) if the tables are already stored in a sorted indexed order. It is also rare the cardinality of these databases will be similar in an analytical query - usually you have one time series “fact table” and a bunch of dimensions to enrich that data.

If I’m doing analytics on a time series this gets even better with partition pruning and hash joins or bitmap indexes. And if I have a columnar database, that blows up this whole complexity argument.

My point is that, layout and indexes should never be assumed to be one size fits all. Keep in mind if I’m doing analytics I want to bring my time series data into memory at least as a stream, as I need to calculate / filter / transform the records. Not everything is about rendering a page on a website.

Re:MongoDB shares jump more than 30% in $192M IPO by acdha on Thursday October 19, 2017 @09:42PM (#15512978)
From the sounds of it, you were downvoted for not recognizing this as a textbook scenario with decades of practice and engine improvements devoted to allowing you to balance query performance against your server budget.

Interestingly enough, many of those techniques are common in the NoSQL world as well — a billion records is enough to require thinking about data flow anywhere — but the difference is that you have to deploy them more frequently.

Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @08:47PM (#15512772)
If you're dealing with billion row tables and using mongodb you are way out of your league. Good luck.
Re:MongoDB shares jump more than 30% in $192M IPO by autokad on Thursday October 19, 2017 @09:48PM (#15513007)
mongodb is not the only nosql db :) I use hive/hbase
Re:MongoDB shares jump more than 30% in $192M IPO by matwood on Thursday October 19, 2017 @05:30PM (#15511704)
> less rigid than classic relational ones

Less rigid than what? The schema is going to exist somewhere...

Re:MongoDB shares jump more than 30% in $192M IPO by nwatson on Thursday October 19, 2017 @05:30PM (#15511706)
So you gonna do all those JOINs in code???
Re:MongoDB shares jump more than 30% in $192M IPO by HodGreeley on Thursday October 19, 2017 @06:19PM (#15512035)
Part of the point is you don't need so many joins.