3 ms·
I would say that it allows one to write statefu, long lasting workflows or processes in a durable and persistent way using all the niceties of regular programmi
by joshlemer 6y ago
I would say that it allows one to write statefu, long lasting workflows or processes in a durable and persistent way using all the niceties of regular programming languages such as Go/Java, like control structures, abstraction, etc. In a similar way that generators in Python/JS allow one to write even complicated iterators much more easily than manually keeping track of state yourself, Temporal allows one to easily define long-lived stateful processes (on order of years even) with the simplicity of roughly:
while(true) {
Thread.sleep(1, MONTH);
sendReminderEmail(user);
}
...which would normally require one to manually keep track of state in queues and key-value stores and idempotent updates, but with temporal the developer can just focus on the simple business rules. The runtime of Temporal takes care of compiling that down into proper state-machine logic.
- swyx 6y agoyeah nice, exactly. i like calling Temporal a "framework" for that reason - you'd have to code + provision all this stuff anyway if you're doing anything async, and you're probably not testing it properly/thinking through scalability needs or lacking debugging tools to investigate issues. I'll volunteer that we don't have Python or JS SDKs right now but are working on it (https://github.com/temporalio/sdk-node https://github.com/temporalio/sdk-node). i think `Thread.sleep(1, MONTH);` is a profound paradigm change in programming that I have been struggling to find the words to describe. It's like, where you used to need to write "multiuser" code, you can now write code as if you simply have one machine per user and it idled or did work as long as your user's activity is still going, whether we're talking the end-to-end journey of a food delivery startup or machine learning data pipelines or infrastructure provisioning at a cloud startup (you can even run a workflow for forever, with some careful segmentation https://docs.temporal.io/docs/concept-workflows#faq https://docs.temporal.io/docs/concept-workflows#faq). this is useful market research for us, thank you for taking up the suggestion :)