Skip to content

[NO NOT MERGE] Direct Nexus calls#720

Open
bergundy wants to merge 1 commit intotemporalio:masterfrom
bergundy:direct-nexus-calls
Open

[NO NOT MERGE] Direct Nexus calls#720
bergundy wants to merge 1 commit intotemporalio:masterfrom
bergundy:direct-nexus-calls

Conversation

@bergundy
Copy link
Member

What changed?

Added two new RPCs for making direct Nexus requests using namespace credentials: StartNexusOperation and CancelNexusOperation.

There's an open PR (#685) that adds support for standalone Nexus operations (with APIs named StartNexusOperationExecution, etc...), which is different than this.
Direct calls do not instantiate a state machine on the caller namespace, they go directly to the handler that is registered for the given endpoint.

The API was modeled after https://github.com/nexus-rpc/api/blob/main/SPEC.md but uses Temporal concepts such a payloads instead Nexus contents. This API is intentionally not compatible with the HTTP spec.

Note that the HTTP routes explicitly qualify these APIs as "requests" to contrast standalone Nexus operation routes, which qualify as "operations". The semantics of the two are different enough that it was deemed the right approach to separate these APIs.

Why?

Allows backing UIs and CLIs with Nexus handlers running on Temporal workers or invoking synchronous system Nexus endpoint operations with minimal overhead.

Server PR

Not yet.

@bergundy bergundy requested review from a team as code owners February 13, 2026 22:50

// An operation was started asynchronously. The token can be used for cancellation.
message AsyncSuccess {
string operation_token = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression that operation token was only for handler-server and caller-server side, not caller client side which operates on operation IDs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for exposing direct calls to a handler, bypassing the durable caller machinery. The semantics are different.

Copy link
Member

@cretz cretz Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. Where are the RPC calls for standalone Nexus operations from a client that are durable and take operation IDs and such? The name of these RPCs makes it seem like those. Or are standalone Nexus operations as being designed internally not occurring as designed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#685 see also PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments