[Idea] Strategies for concurrency
MerrionComputing opened this issue · comments
Business and technology solutions to concurrency issues (like the traditional example of the bank transfer).
- Compensation actions
- As-of read model actions
- State change prevention
Why do we need solutions to concurrency issues?
Is "fingers crossed" ever a viable strategy?
Yeah "finger crossed" is viable if it costs less than solving them ;-)
Or a runbook with "step 1: shout in the room if anyone else is updating global settings. If no-one answers within 2 minutes move to step 2."
You could have a semaphore (the "I am updating these settings" hat...and there is only one hat) - this would be a form of state change prevention.
you mean an Xclusive lock :-)
Well, yeah it is a kind of semaphore, but I mentioned it because it's outside of the system itself and relies on people playing nice and adhering to a workflow. The effort involved is at least one order of magnitude less than any state change prevention in code.
Working title "What to do if transactions don't exist"...