Comment

Comment by shhsshs

Those two concepts are not mutually exclusive. Each change can be idempotent by marking some identifying information about the state it was trying to update.

    increase balance by 10 (it is currently 100)
    balance is now 110
    increase balance by 10 (it is currently 100) <- duplicate event!
    event has already been applied
    balance is now 110
It can definitely break down at some point (maybe the user really did want to increase by 10 two times, they just clicked twice really fast?). But idempotency and change-based flow can live together.
parent shhsshs 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton