6 ms·
RDBMS makes sense for most applications. Most applications store data that can be fit to the relational model. Most applications aren't big data or data minin
by da_chicken 9y ago
RDBMS makes sense for most applications. Most applications store data that can be fit to the relational model. Most applications aren't big data or data mining OLAP.
Most RDBMSs can do key-value stores very well now. Most applications also care more about consistency over availability, which is what RDBMSs do (CAP theorem). Many NoSQL data stores choose availability and partitioning and sacrifice consistency (i.e., "eventual consistency"). There's a lot of applications that you can't sacrifice consistency for. Electronic health records, financial records, student records, employee records, etc. You care that the data are accurate and up to date, and you want the system to error if it can't provide that. Wrong answers and "close enough" answers aren't good enough.
Now, if you're running Reddit or Wikipedia or Facebook or HN... do you really care if a user doesn't get the absolute latest version of a document or comment? No, not really. If the content is hours old it's a problem, but it's not a big deal if it's a few minutes out of date. You care more that your users get a version of the document more than you care that they get the latest version of the document.
- eternalban 9y ago> RDBMS makes sense for most applications. But "applications" are built by development teams. So: Does an "RDBMS makes sense for most applications"?
- kornish 9y agoCould you point to a definition of "application" that has the word "team" in it?
- eternalban 9y agoWhy should I waste time on a non-sequitur?
- zzzcpan 9y agoYou don't seem to know this, but no traditional RDBMSs actually provide CAP consistency, for that they would have to use at least two-phase commit or something, but they don't. So, they all are noCAP databases. Electronic health or financial records are way safer in a proper eventually consistent database, like orders of magnitude safer, but everyone just takes the risk with some insurance at best to cover the losses. EDIT: If you downvote, please explain why. You can't disagree with the truth.
- toomuchtodo 9y agoIn certain environments, it is better to fail then to have data that isn't immediately consistent. Finance and healthcare are two such systems. Availability is not always paramount. https://en.wikipedia.org/wiki/Database_transaction https://en.wikipedia.org/wiki/Database_transaction https://en.wikipedia.org/wiki/Atomicity_(database_systems) https://en.wikipedia.org/wiki/Atomicity_(database_systems)
- zzzcpan 9y agoThey only guarantee consistency as long as you don't use them over a network, i.e. communications with the database are always reliable. But once you do use them over a network - CAP theorem comes in and forces you to either use something like two-phase commit or no promises of consistency. Which is the opposite of what his post implied, like there is CAP consistency with those databases. But there never was! Although I kind of got used to RDBMS crowd not understanding consistency, it's just another technology cult.
- richardwhiuk 9y agoProper RDMS databases have two phase commit with transactions.....
- zzzcpan 9y agoWhich ones? Traditional mainstream RDBMSs, like Mysql and Postgres don't use two-phase commit protocol. Obviously new distributed ones do it properly, but we are not talking about them.
- orf 9y agohttps://www.postgresql.org/docs/9.3/static/sql-prepare-transaction.html https://www.postgresql.org/docs/9.3/static/sql-prepare-trans...
- deleted 9y ago[deleted]
- gaius 9y agoMost RDBMSs can do key-value stores very well now. Yep, all of MongoDB is just one bullet point on Postgres's list of features. Anyone spending on money on it ought to be hauled before the shareholders and given a talking to on fiduciary responsibility...
- elvinyung 9y ago>just one bullet point Tell me again how Postgres can seamlessly do horizontal scaling and synchronous replication?
- shawn-butler 9y agoSynchronous replication was added in 9.1 and much improved in 9.6? pglogical[0] works pretty well for me under 10 but I have no production experience with bdr[1]. [0]: https://www.2ndquadrant.com/en/resources/pglogical/ https://www.2ndquadrant.com/en/resources/pglogical/ [1]: https://www.2ndquadrant.com/en/resources/bdr/ https://www.2ndquadrant.com/en/resources/bdr/
- elvinyung 9y agoIMO, sure but it's far from seamless. (I also looked at pg's quorum commits, but the same applies.) In general Postgres was not designed at its core for a distributed world. Even now, replication feels like an afterthought in the grand scheme of things, and sharding nonexistent without extensions.
- orf 9y agohttps://jepsen.io/analyses/mongodb-3-4-0-rc3 https://jepsen.io/analyses/mongodb-3-4-0-rc3 > MongoDB’s version 0 replication protocol is inherently unsafe. Tell me again how MongoDB took 8 years to get to the point where its replication is kind of OK.
- skrebbel 9y agoThis subthread is about the future, not the past. 8 years ago, PG didn't have json support so your point is moot. I'm very curious about what people think about the future of Mongo, independently and particularly in comparison to Postgres. However every time that comes up, people keep bringing up that Mongo was a buggy piece of crap in some irrelevant past. So what?
- paulmd 9y ago> Now, if you're running Reddit or Wikipedia or Facebook or HN... do you really care if a user doesn't get the absolute latest version of a document or comment? I mean... do you? I often come back a few minutes after posting to add something I forgot or rephrase something for clarity. I hate when I am tweaking a Reddit comment a couple times during a period of high server load and I get served an old version of the comment and end up losing something I added in a previous edit. With something like Wikipedia it would be quite frustrating to lose revisions. Obviously it is what it is, I can't change their codebase, and I'm sure it's necessary as currently engineered, but is there really no other way to cluster their data except "one big table"? Maybe like shard subreddits to specific servers ala Hyperdex? But yeah, most places that Mongo is applied aren't exactly Facebook or Reddit either, in terms of total data throughput.
- da_chicken 9y agoOh, it will certainly come up, but it's not going to break Reddit if you get an old version of a comment as long as it's eventually consistent. Nobody is going to die, and nobody is going to lose any money. Data stores like Cassandra and MongoDB don't lose revisions. That's not the kind of consistency we're talking about. CAP consistency is just getting the most recent version. You won't lose data -- data loss is a bug, not expected behavior, just like any other data store -- you just won't always get the most recent version of it. And, keep in mind, when we talk about eventual consistency here we generally mean "consistent on all nodes within a few minutes, but we're not blocking reads to write this data." It's not going to take hours. That said, if you find you get an old version of your own comment, I'd be more willing to believe it's the fact that your request failed with a 503 error or otherwise timed out as much as it was a data store problem. Next time it happens, wait 5 minutes and try again. > is there really no other way to cluster their data except "one big table"? Maybe like shard subreddits to specific servers ala Hyperdex? The whole point of MongoDB or Cassandra is that you can get shards without all the headache that RDBMSs usually put you through. You configure your sharding function and let the system do the rest. You don't have to connect to the right shard or anything of the sort, which some RDBMSs do (or did, it's been awhile since I've looked) require with sharding. Reddit has their code and architecture posted, though it's out-of-date now, it makes it clear that it's basically just two big tables: https://github.com/reddit/reddit/wiki/Architecture-Overview https://github.com/reddit/reddit/wiki/Architecture-Overview It's PostgreSQL, ThingDB, Cassandra, memcached, and RabbitMQ.
- rareattention 9y ago>RDBMS makes sense for most applications. Why? An RDBMS has never been the best option for any application I have created and I have created standard business applications as well as consumer applications.
- tribaal 9y ago> Now, if you're running Reddit or Wikipedia or Facebook or HN... Wikipedia uses MariaDB (so, MySQL). https://meta.wikimedia.org/wiki/Wikimedia_servers#Software https://meta.wikimedia.org/wiki/Wikimedia_servers#Software
- sigzero 9y agoMongoDB is the MariaDB of the NoSQL world.
- da_chicken 9y agoWikipedia predates NoSQL. It runs on PHP + MySQL because that's what was most popular back in 2001, and they have no intrest in completely rewriting their entire stack just to use Cassandra or MongoDB. That doesn't mean a NoSQL data store wouldn't work extremely well for the type of application that Wikipedia is.
- Daycrawler 9y agoIt's not about the applications. It's about the components of the application. Reddit, Wikipedia, Facebook, HN, all use a mixture of RDBMS and NoSQL.