Context
Operations can fail part way through. Clients can retry, but might give up before driving the operation to completion.
Prerequisites
The operation is resumable and recovery points are used.
It is acceptable for the operation to happen asynchronously.
Example
Making a payment on an e-commerce system. At a high level, the operation might look like this:
- Save order details.
- Take payment.
- Start fulfilment process.
Taking a payment but never starting the fulfilment process would result in some unhappy customers.
Problem
How do we ensure that important multi-step operations are always completed?
Solution
Run a background completer process. It should:
- Find recovery points which are incomplete, and have not been updated recently.
- Resume the operation. Either by running the operation itself, or by requesting the application process to do it.
Also known as
See also
Related
- Recovery point – Record current progress to allow recovery with minimal rework
- Reliable retries – Reliably keep retrying until success
- Resumable operation – Allow operations to continue from where the previous attempt failed
- Transactional outbox – Transactionally write a description of work to be performed asynchronously