Renato Mefi
04/13/2022, 5:20 PMWhat are the dual writes? I still don’t get the main point of it.That’s a great one Dual-writes tend to be an “invisible” problem, until you see it, then you see it everywhere! Dual-writes means writing something twice, so let’s say you do an operation on the database, and then you have to send a message to a broker, or make an API call, etc. This process can look simple, however, if the second operation has to be data consistent with the first one, then how do you guarantee that? It’s oftentimes a second thought, but if you store to the DB and then the API call fails, do you rollback the transaction? And what if the application crashes in between the DB transaction and the API call? If you put them in the same transaction would you be creating an “idle in transaction” issue in your infrastructure? dual-writes can also be see as an “unknown cause for data inconsistency” It’s common we want thing to be consistent, and dual-writes is an invisible problem that might be causing data inconsistency in your platform, that’s a very common and dangerous one.
Silvia Rhodes
04/13/2022, 5:24 PMRenato Mefi
04/13/2022, 5:26 PMSilvia Rhodes
04/13/2022, 5:31 PM