News for hackers. Stuff that matters.
Re:Why SQL is beating NoSQL, and what this means for the fut... by jjirsa on Monday September 25, 2017 @11:54PM (#15335998)
There is so much wrong with this post I don’t know where to start

Old school sql replication is awful. It’s awful in Postgres (single threaded replay? A single vacuum can make your slaves fall behind). It’s awful in MySQL (go ahead and tell me how you do dual master without rewriting your app).

People use nosql not because it’s eady or flawless, but because doing it with sql is an order of magnitude harder.

Go ahead and describe resharding a sql DB as your company grows 100x

Or how you’ll handle a dc failover and fail back

Or how you’ll shrink your resources after the holidays - without downtime.

These are trivial with Cassandra and god damn near impossible for most MySQL users.

More reliable? Your “big iron” is still a single point of failure. If not a single cpu, a raid card or a top of rack switch or a DC in a hurricane zone.

Re:Why SQL is beating NoSQL, and what this means for the fut... by 6nf on Tuesday September 26, 2017 @12:30AM (#15336178)
> damn near impossible for most MySQL users.

MySQL? Nobody, and I mean NOBOBY is saying you should use MySQL. All of the things you mention is trivial using a decent SQL solution like PostgreSQL.

Re:Why SQL is beating NoSQL, and what this means for the fut... by jjirsa on Tuesday September 26, 2017 @12:31AM (#15336184)
Except the person to whom I replied said to use traditional SQL databases:

> Traditional SQL databases end up being many times simpler in practice, and because of their inherent scaling limitations, much easier to manage. And most importantly: their implementations aren't buggy.

Re:Why SQL is beating NoSQL, and what this means for the fut... by 6nf on Tuesday September 26, 2017 @01:19AM (#15336392)
They mean traditional SQL databases like PostgreSQL, SQL Server, DB2, Oracle etc.

Not MySQL. MySQL has almost none of the important features of a real SQL database management system. Nobody should be using MySQL for anything.

Re:Why SQL is beating NoSQL, and what this means for the fut... by jjirsa on Tuesday September 26, 2017 @01:31AM (#15336435)
Quick, tell YouTube and Facebook they’ve been doing it wrong all along
Re:Why SQL is beating NoSQL, and what this means for the fut... by 6nf on Tuesday September 26, 2017 @01:34AM (#15336448)
They are NOT using stock-standard MySQL and haven't done so for many years. If you are big enough to make your own programming languages the normal rules do not apply.

And if you ask the Youtube team for a recommendation for your project, they will not point you to MySQL.

Re:Why SQL is beating NoSQL, and what this means for the fut... by jaequery on Tuesday September 26, 2017 @02:15AM (#15336599)
i haven't touched mysql in years but quite frankly, 99% of websites out there (blog/cms) will run fairly fine on a Mysql database. as for the other 1%, they would be big enough to pick the right db of their choice as the time comes. so there is no need to tell everyone you should be using this or that.

this is kind of like telling everyone that they should ALL be using emacs, when vim/nano is still sufficient for the job.

Re:Why SQL is beating NoSQL, and what this means for the fut... by 6nf on Tuesday September 26, 2017 @07:51PM (#15343689)
I honestly don't see a single reason why MySQL should be used over PostgreSQL for anything, thus my sweeping statement. I could be wrong but I don't think so.
Re:Why SQL is beating NoSQL, and what this means for the fut... by elvinyung on Tuesday September 26, 2017 @12:01AM (#15336029)
You got downvoted, but I agree with you. Traditional RDBMS is inherently single-node and a pain to scale. The actual sad thing here is that there's no mature/reliable commodity (i.e. open source) distributed RDBMS for transaction processing yet.
Re:Why SQL is beating NoSQL, and what this means for the fut... by jinqueeny on Tuesday September 26, 2017 @04:05AM (#15336986)
I have to bring this up again: NewSQL. There are quite a few new choices out there, Google Spanner, Cockroachdb(https://github.com/cockroachdb/cockroach), TiDB (https://github.com/pingcap/tidb). All of them are very easy to scale while maintaining the ACID transactions.
Re:Why SQL is beating NoSQL, and what this means for the fut... by elvinyung on Tuesday September 26, 2017 @02:42PM (#15341443)
I said open source and mature :)

IMO really the best option for distributed OLTP RDBMS/NewSQL right now is basically either Citus or Vitess, only because they are built on the backs of extremely mature databases. It really feels like all other options are not mature enough (except maybe VoltDB).

Re:Why SQL is beating NoSQL, and what this means for the fut... by jinqueeny on Tuesday September 26, 2017 @06:45PM (#15343270)
Could you please elaborate how you define "mature"?
Re:Why SQL is beating NoSQL, and what this means for the fut... by elvinyung on Wednesday September 27, 2017 @03:13AM (#15345542)
IMO, in descending order of importance to me:

* Dependability. I can be completely certain that standard usage of the database won't lose my data or leave it in a bad state, at the very least.

* Community. There's an active IRC channel (or the like) where I can ask questions. When an error show up, I can Google it and easily find an applicable solution most of the time.

* Performance. Not just with synthetic (i.e. TPC-C, TPC-H, YCSB, etc.) workloads, but proven to have reasonably satisfactory QPS in many/most real production settings.

* Ecosystem. There's a good collection of first-party (and also ideally third-party) tools, constantly being improved. (Mere wire-compatibility with MySQL or Postgres might be good, but probably isn't enough, since 100% wire compatibility seems rare.)

Re:Why SQL is beating NoSQL, and what this means for the fut... by jinqueeny on Wednesday September 27, 2017 @04:26AM (#15345845)
Thanks for sharing!These criteria seems quite practical. You are probably right. Time will tell.
Re:Why SQL is beating NoSQL, and what this means for the fut... by rhencke on Tuesday September 26, 2017 @12:26AM (#15336163)
CockroachDB? I'll grant you it's still young, but it pretty solidly hits all your other checkboxes.
Re:Why SQL is beating NoSQL, and what this means for the fut... by elvinyung on Tuesday September 26, 2017 @12:34AM (#15336204)
IMO, it's very promising but still extremely immature.

I still believe in Curt Monash's cardinal rule of RDBMS development: http://www.dbms2.com/2013/03/18/dbms-development-marklogic-h...

Re:Why SQL is beating NoSQL, and what this means for the fut... by yenwel on Tuesday September 26, 2017 @01:58AM (#15336518)
VoltDB?
Re:Why SQL is beating NoSQL, and what this means for the fut... by stephenr on Tuesday September 26, 2017 @11:05AM (#15339279)
Galera + HAProxy or ProxySQL should give you a multi-master MySQL with no app rewrites required, no?
Re:Why SQL is beating NoSQL, and what this means for the fut... by jjirsa on Tuesday September 26, 2017 @10:34PM (#15344457)
Primary key conflicts are still a thing. Especially problematic where you're either not using auto_incrementing PKs, and/or you try to switch writes from one master to the other and app has to be aware of the switch.
Re:Why SQL is beating NoSQL, and what this means for the fut... by stephenr on Tuesday September 26, 2017 @10:46PM (#15344521)
Not using auto incrementing keys is surely a rarity with MySQL projects.

Even before galera was a thing regular MySQL replication could use auto_increment_(increment|offset) to make each server generate unique id's.

Re:Why SQL is beating NoSQL, and what this means for the fut... by jjirsa on Wednesday September 27, 2017 @12:26PM (#15349407)
There exists a LOT of data models that don’t use auto incrementinf primary keys. Rarity or not, it’s a real use case and a real problem for master/master replication

Also, even if you do use auto increment with offsets for each server, you’ll have to know how many servers you’ll eventually have, or waste offsets and eventually risk outrunning your data types

Re:Why SQL is beating NoSQL, and what this means for the fut... by stephenr on Wednesday September 27, 2017 @12:33PM (#15349481)
Non auto keys will already need some way to ensure uniqueness that will involve the application expecting conflicts.

For those that do use auto inc, galera will manage the offset/increment value based on cluster size automatically.