Re:If Eventual Consistency Seems Hard, Wait Till You Try MVCC
by curun1r on Tuesday December 09, 2014 @12:25AM
(#8721177)
If you're not modifying the same data, then there's no need for ACID...AD will do just fine. The whole point of the CI is to govern what happens when there is contention for the same data. Brushing that occurrence aside and saying it's rare is asinine...it's going to happen and programmers need to account for it. With serializable isolation, you risk your application blocking (can be acceptable) or even deadlocking (never acceptable).
[ Parent
| on HN ]
Re:If Eventual Consistency Seems Hard, Wait Till You Try MVCC
by grogers on Tuesday December 09, 2014 @12:52AM
(#8721274)
That probably came across wrong. What I meant was that the ability to do concurrent access is the important thing, not the performance of it. CPUs aren't any good at contended access to memory cells, but they still allow it and it works. If you want your system to scale to many threads you need to break the sharing.
Same with databases. The important thing is that it gives you strong consistency when there is contention. It'll never be as performant as operating on different rows concurrently though. When you touch different rows, you don't feel the pain of locking, which is the common case.
Re:If Eventual Consistency Seems Hard, Wait Till You Try MVCC
by jbergens on Tuesday December 09, 2014 @06:09AM
(#8722138)
I agree and one thing that is missing from this discussion is that many document databases are atomic around a document update. That gives the developer a very easy model to work with for a lot of things, you can update any part of a document without conflicts. In a relational system that would probably require updates/reads from multiple tables. Of course it won't work for everything but you can get an easy model to understand.
Re:If Eventual Consistency Seems Hard, Wait Till You Try MVCC
by AlisdairO on Tuesday December 09, 2014 @11:26AM
(#8723635)
That is true - but it's a commonly observed fact that it's rare for a nontrivial application to manage to limit every logical operation to single document updates.
Re:If Eventual Consistency Seems Hard, Wait Till You Try MVCC
by rsanders on Tuesday December 09, 2014 @12:34AM
(#8721208)
You don't need to be using serializable isolation to face blocking or deadlocks. So-called "deadlocks" really aren't that bad when they are detected and all but one of the competing transactions are failed. You just catch the error and retry.