Use your database to power state machines

abobla@lemm.ee to Programming@programming.dev – 46 points –
Use your database to power state machines
blog.lawrencejones.dev
8

You are viewing a single comment

I don't understand why the most_recent field is needed. Surely the most recent state can be derived from the order field and the unique constraint on it can prevent concurrency issues if the previous sequence is taken before the state change. The benefit would be that the transition history table could then be append only.

4 more...