Skip to content

feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) (#16793)#16793

Open
zhichenxu-meta wants to merge 2 commits intofacebookincubator:mainfrom
zhichenxu-meta:export-D94996268
Open

feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) (#16793)#16793
zhichenxu-meta wants to merge 2 commits intofacebookincubator:mainfrom
zhichenxu-meta:export-D94996268

Conversation

@zhichenxu-meta
Copy link
Contributor

@zhichenxu-meta zhichenxu-meta commented Mar 16, 2026

Summary:

Stub registration and sidecar discovery support.

RPCFunctionStubs: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

AsyncRPCFunctionRegistry additions:

  • registerStubs(namespacePrefix): Registers stubs under the Presto
    namespace (e.g., presto.default.fb_llm_inference)
  • Deferred stub registration: signatures stored at static init time,
    stubs registered later when the namespace prefix is known

AsyncRPCFunctionRegistrar: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268

@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit af883a1
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/69b8db0c1ada1d000848accc

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 16, 2026

@zhichenxu-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94996268.

zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
@meta-codesync meta-codesync bot changed the title feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) (#16793) Mar 16, 2026
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 16, 2026
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
…ork [4/8] (OSS)

Summary:
Unit tests and reference implementation for the RPC framework.

**DemoAsyncRPCFunction**: Complete reference implementation of
AsyncRPCFunction, demonstrating the full contract: dispatchPerRow()
(per-row dispatch via MockRPCClient with null handling via immediate
error responses), buildOutput() (default VARCHAR FlatVector from base
class), tierKey() (default ""), and signatures(). Use this as a
template when implementing new RPC functions.

**DemoRPCFunctionTest**: End-to-end test exercising the full pipeline:
initialize -> dispatchPerRow -> resolve futures -> buildOutput.
Also covers null input handling (error="null_input"), error response
mapping, signatures, and tierKey() accessor.

**MockRPCClientTest**: Single-call and batch-call interfaces. Verifies
response generation, error injection, and rowId preservation.

**RPCStateTest**: Both streaming modes (PER_ROW and BATCH):
addPendingRow/tryClaimOrWait, addPendingBatch/tryPollBatchOrWait,
drainReadyRows, error propagation, backpressure, noMoreInput/isFinished
lifecycle, input batch storage with reference-counted release.

**RPCNodeTest**: Tests core::RPCNode with name-based API — construction
with function name + result type, accessors, streaming mode config,
dispatchPerRow via mock, buildOutput, and toString().

Differential Revision: D94996255
zhichenxu-meta added a commit to zhichenxu-meta/velox that referenced this pull request Mar 17, 2026
…acebookincubator#16793)

Summary:

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

Differential Revision: D94996268
…acebookincubator#16793)

Summary:
Pull Request resolved: facebookincubator#16793

Stub registration and sidecar discovery support.

**RPCFunctionStubs**: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.

**AsyncRPCFunctionRegistry additions**:
- registerStubs(namespacePrefix): Registers stubs under the Presto
  namespace (e.g., presto.default.fb_llm_inference)
- Deferred stub registration: signatures stored at static init time,
  stubs registered later when the namespace prefix is known

**AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant