> Only one user should receive a success. The article describes a setup where both users receive a success because of write skew.
It describes a setup where neither user bothers to check whether they had a success because the authors are affecting not to understand how to use Kafka.
> What the article is saying is that you can't just check the DB to see if items are in stock and write your order to a queue.
You can't do that with a database either. You have to actually handle the case where it fails. It's not actually any easier than doing it properly with Kafka.
> Literally the whole point of ACID databases is that multiple clients can operate on the same set of data and avoid putting it into a bad state. If I'm a bank storing an account balance of $20 and you withdraw $20 and I withdraw $20, only one of us should get $20.
Banks don't actually use ACID transactions for that, because they don't work in the real world; the bank needs to have a record of both your attempts to withdraw $20, not for one of you to see an error. What a bank ends up implementing is much the same as what you implement when using Kafka.
> You can't do that with a database either. You have to actually handle the case where it fails.
This is provably false, as evidenced by Postgres's FOR UPDATE locking support. Of course you have to handle the failure, that's what tells you your mutation failed. RDBMS systems can absolutely guarantee that writes are performed atomically. One only needs to look at Aphyr's extensive testing of databases with Jepsen. Claiming this is all bunk is dismissing reality.
> Banks don't actually use ACID transactions for that
It describes a setup where neither user bothers to check whether they had a success because the authors are affecting not to understand how to use Kafka.
> What the article is saying is that you can't just check the DB to see if items are in stock and write your order to a queue.
You can't do that with a database either. You have to actually handle the case where it fails. It's not actually any easier than doing it properly with Kafka.
> Literally the whole point of ACID databases is that multiple clients can operate on the same set of data and avoid putting it into a bad state. If I'm a bank storing an account balance of $20 and you withdraw $20 and I withdraw $20, only one of us should get $20.
Banks don't actually use ACID transactions for that, because they don't work in the real world; the bank needs to have a record of both your attempts to withdraw $20, not for one of you to see an error. What a bank ends up implementing is much the same as what you implement when using Kafka.