4 ms·
> Idempotency refers to the ability of an operation to be performed multiple times whilst still yielding the same outcome. I'm not a fan of this definition bec
by jmull 2y ago
> Idempotency refers to the ability of an operation to be performed multiple times whilst still yielding the same outcome.
I'm not a fan of this definition because it might give someone the wrong impression.
Suppose the operation is "deposit $10 to account 1234". If that operation is processed twice, a total of $10 should be deposited to account 1234 (for it to be idempotent). By the definition from the article, it sounds like perhaps it would be idempotent if the operation deposited $10 each time it was processed.
- stackskipton 2y agoYea, I see Idempotency as being you can submit same transaction multiple times without duplicate actions. So you to use your example, if I submitted "Deposit $10 to account 1234, transaction ID: ABC" four times, the system wouldn't execute it four times because it has enough data to determine if transaction is duplicate or not.
- layer8 2y ago"Same state" instead of "same outcome" would make it clearer.