Temporal provides a programming model for building resilient distributed applications where Workflows survive failures, server restarts, and network partitions. Test your Temporal knowledge.
0 / 5 completed
1 / 5
In Temporal, what is a Workflow and what constraint must its code follow?
Temporal Workflows must be deterministic because Temporal replays the workflow's event history to restore its state after a failure. Non-deterministic code (like Math.random(), Date.now(), or direct network calls) would produce different results during replay. Use workflow.now() for time and Activities for all I/O.
2 / 5
What is a Temporal Activity and why do Workflows delegate I/O to them?
Activities are regular async functions that can do anything — call APIs, write to databases, send emails. Because they run outside the Workflow's deterministic execution context, they can use non-deterministic operations freely. Temporal retries failed Activities automatically and records their results in the event history for Workflow replay.
3 / 5
What is the role of a Temporal Worker?
Temporal Workers are long-running processes your application runs that poll Temporal's task queues. When a Workflow or Activity task is scheduled, the Worker picks it up and executes the corresponding code in your application. You control the execution environment — Workers run in your infrastructure, not Temporal's cloud.
4 / 5
What are signals in Temporal and when would you use them?
Signals are fire-and-forget messages sent to a running Workflow using handle.signal(mySignal, payload). The Workflow declares signal handlers with setHandler(mySignal, (payload) => ...) to update internal state or unblock a condition() wait. They're ideal for human-in-the-loop steps like approvals or cancellation requests.
5 / 5
What do Temporal queries allow you to do, and how do they differ from signals?
Queries are synchronous read operations that return a value from the Workflow's current in-memory state — for example, handle.query(getStatus) might return 'processing'. Unlike signals (fire-and-forget, can modify state), queries are read-only, return a response to the caller immediately, and never affect Workflow execution or history.