TECHNOLOGY

Temporal Query, Signal and Update acknowledge different work

In this article
THE QUICK TAKE

Choose the message type according to the response the caller needs, and label acceptance separately from handler completion.

Match the interaction to the caller’s question

A long-running research agent waits for a reviewer. The interface needs to show progress, record a decision and sometimes confirm that the decision was applied. Temporal’s message-passing overview offers Query, Signal and Update for those different interactions. Choose by the required acknowledgement rather than calling every message a generic request and interpreting any successful response as completed work.

Use a Query for an immediate state read

A Query reads workflow state without changing it or adding history entries. It cannot block until a desired future condition occurs. In the Python guide, a Query handler is synchronous and cannot execute an Activity. A worker must be available to process it. Use the result to describe observed workflow state, rather than assuming a read request performs a new model evaluation or waits for pending research to finish.

Interpret Signal acceptance narrowly

A Signal asynchronously changes the running workflow. Its client call returns when the server accepts the message, without waiting for the handler to process it. For a reviewer decision, display submission separately from application. If the interface needs a later outcome, define an appropriate observable state and query it. The identity guide helps address the intended business workflow even as its run identity changes over its lifetime.

Use an Update when a result matters

An Update is tracked and can return a value or failure after changing state. Its optional validator can reject input before acceptance into history; acceptance still differs from completion. For example, reject a decision for an already closed review stage, then return a confirmation only after the valid state transition finishes. This makes the response contract clearer than sending a Signal and inventing a synchronous success message for work the handler has not yet performed.

Verify each acknowledgement in the interface

Use a small controlled workflow to observe submission, acceptance and handler result. Test unavailable-worker and rejected-input cases as distinct outcomes. A task contract defines what the interaction should accomplish; tool observations preserve the actual stage reached. Keep the UI wording aligned with that evidence. A recorded message is useful durability, while completion requires the handler’s documented outcome or an independently observed state change.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles