Skip to content

Add executionEndpoint to REST function handles #25383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tdcmeehan
Copy link
Contributor

Description

Adds an executionEndpoint and routes accordingly in the RestFunctionNamespaceManager.

Motivation and Context

Fix #25331

Impact

Allow distributed function server deployments.

Test Plan

Unit tests have been added in this PR.

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@tdcmeehan tdcmeehan requested a review from a team as a code owner June 19, 2025 19:33
@tdcmeehan tdcmeehan requested a review from jaystarshot June 19, 2025 19:33
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Jun 19, 2025
@prestodb-ci prestodb-ci requested review from a team, NivinCS and xin-zhang2 and removed request for a team June 19, 2025 19:33
@tdcmeehan tdcmeehan requested a review from Joe-Abraham June 19, 2025 20:37
format: uri
pattern: "^https?://"
description: |
Base URL of the execution server where this function should be executed.
Copy link
Member

Choose a reason for hiding this comment

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

Is this execution model defined? Will a driver send multiple batches in parallel (i.e., multiplexed) over the same connection, or will the driver and server follow a sequential/wait model where each batch is acknowledged before sending?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As only scalar functions are supported, the function server is completely stateless, and batches of data may be sent in any order and may be multiplexed.

Copy link
Member

@jaystarshot jaystarshot Jun 20, 2025

Choose a reason for hiding this comment

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

But that will need operator changes for the driver to send multiple batches and process async responses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These already exist--RemoteProjectOperator in Java, and analogous C++ operators.

Copy link
Member

Choose a reason for hiding this comment

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

Nice, another think we should consider was to add a limit to the number of rows sent at an operator level (for eg if these functions are sent to ML models) etc

Copy link
Member

Choose a reason for hiding this comment

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

I guess that can be implemented in the server itself too in a way

Copy link
Member

@jaystarshot jaystarshot Jul 2, 2025

Choose a reason for hiding this comment

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

I checked but velox doest seem to have a remote project operator. Is that support left? I do some remote function definitions there though (link)

jaystarshot
jaystarshot previously approved these changes Jun 20, 2025
Copy link
Contributor

@Joe-Abraham Joe-Abraham left a comment

Choose a reason for hiding this comment

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

LGTM

@tdcmeehan tdcmeehan force-pushed the meta-exec branch 2 times, most recently from da54833 to 30aed69 Compare June 24, 2025 16:21
import java.net.URI;
import java.util.List;
import java.util.Optional;

import static java.util.Objects.requireNonNull;

@Experimental
public class RestFunctionHandle
Copy link
Contributor

Choose a reason for hiding this comment

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

@tdcmeehan : Just curious since we are not using this in Prestissimo serialization logic. Do we intend to in the future ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for separate metadata and execution servers in REST function API
6 participants