workflows vs services
Slides: https://pages.temporal.io/rs/250-WIU-007/images/Replay2023-daniel-golant.pdf
Abstract
When do we use workflow engines?
The speaker does not talk about the “trivial” aspect, like the network, the hardware, etc… but prefer tackling the question in a more broad way. He says it’s more about inversion of execution.
Time moves slow
- Any setting where no significant action needs to feel asynchronous.
- Dominant interaction lifespans are minutes to hours.
- Coordination cannot easily be handled by a client.
Uncharted territory
- When we don’t know what data we may need in the future.
- Lots of small, contingent interactions rather than a handful of big ones.
- An unbounded set of branching outcomes
The Workflow model abstracts the programming model up to the human scale.
Heavy on State, Heavy on States
- Highly dimensional data, and a lot of it.
- Hard-to-unwind user errors.
- A maze of forms.
How do we know we’re using them well?
Step by Step vs Layer by Layer
- Laying railroad over paving lanes, i.e. different from a classic MVP where you would quickly pave the way for a portion of the users, and incrementally open for the rest of the users, encapsulate every unit of information that you need to bring you closer to your final State and lay the railroad tie by tie.
- With Temporal, you can inject human in the loop, thus you can leverage this key advantage to deliver value progressively, sort of selling point of doing a MVP.
- At each step, you automate, then you kick people out of the manual handling.
- Full coverage, part of the way.
- Learn as you go.
Decoupled, then Couple
- Uncouple to discover.
- Couple to crystalize.
- Coupling in order to do better sort of user-faced observability.
- Use the data model as your engine.
- Start working based off data mutation, i.e. mutate the data to drive application state.
- This can tell your users where they currently are.
Use the Primitive
- Statically define inputs, generate user interfaces.
- Standardize wait behavior.
- Self-instrumenting code, observability as UX.
Why do I think Workflow models are the future?
Businesses we’re modeling are becoming as complex and sensitive as our data pipelines. There’re some demands of software that converges from some sort of OLAP world and the OLTP world and we need properties of both of these models in one place. And we will need the replayabilitiy and audit sort of capabilities in order to build scaling businesses.
Reviews
The speaker talks about “Workflow programming”, which quite interesting because that means it’s another way to produce a program. And indeed, there’s a paradigm shift for micro-service architectures with Temporal.
One sentence that made me thinking is the inversion of execution. That reminds me of the inversion of control we are used to, and I think it depicts Temporal quite well: we are implementing the Activities and put them in Workers, and it’s the Temporal Application that will coordinate each steps of the Activities.
Another really good point he said is that the Workflow model abstracts the programming model up to the human scale, i.e. functions limited in the runtime whereas durable execution, that is implemented by Temporal, gives us the ability to arbitrarily wait for human scale interactions, decoupled from any single process or machine.
See also