|
|
|
|
|
by alganet
720 days ago
|
|
I think the text is meant as a checklist you can use to apply to some system, not a list of impossibilities. For example: > Events will arrive in order, even if specified by the producer contract This reminds me of a system I worked on. It used FIFO queues, but even with very low throughput we were getting out of order records on our database. It turns out there was a rogue worker re-queueing some items into a non-FIFO standard queue that CAN deliver out of order stuff, and that was messing things up. We were trusting the producer contract, which works well enough, but there were guarantees we needed to make on _OUR_ side to ensure proper ordering all the way through. |
|
I could say, "Falsehoods programmers believe about databases:"
And say
* Transactions are atomic
But it's not helpful without examples of when and why they're not atomic.
And it's not helpful to programmers to write their software as if transactions are not atomic. The ability to think about transactions as atomic is a fundamental of the database system.
A programmer is far more effective if they leverage the fact that their DB does have atomicity guarantees and write their software accordingly, rather than slowing everything down by trying to code around an assumption they are not, because perhaps in just the right failure mode or configuration of the right database product, they might not be.
That's why examples are so important, because going through this checklist in code review is a huge waste of time if it's not actually applicable. Being able to leverage assumptions about a system is a force-multiplier.