Long-Running Workflows
Before we move on, though, let’s revisit an important assumption about the pipeline. We’re expecting that even though there are calls to remote systems, the pipeline will complete within a short time, in the order of seconds.
But what if these external services took much longer to complete? For example, what if validation was done by a person rather a machine, and it took that person all day? Or what if pricing was done by a different department, and it took those folks a long time as well. If these things were true, how would it affect the design?
First, we would need to save the state into storage before calling a remote service, then we’d wait for a message telling us that the service had finished, and then we’d have ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access