AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Durability Over Duration
Workflow code execution occurs outside of the temporal cluster, utilizing a worker process that acts as a queue consumer. This worker listens for tasks and executes workflows while handling state transactions to prevent race conditions. If a workflow encounters a sleep command, it converts this into a timer command, which is stored durable in the database, ensuring continued operation even after long delays. Fast-running workflows can be cached in memory for quick access, optimizing performance. Temporal’s architecture supports a wide range of workflow durations, from very short to extremely long, emphasizing durability and guaranteed completion. In distributed systems where transactions may fail, Temporal serves as a reliable substitute for handling compensations, particularly useful in scenarios such as instant payments where operational accuracy is crucial. Additionally, workflows can manage continuous events, like monitoring an airline's loyalty program, to maintain ongoing state over time, ensuring customer interactions are seamless and responsive.