Skip to content
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

[Serve] Define Java Backend #16169

Merged
merged 10 commits into from
Jul 2, 2021
Merged

Conversation

liuyang-my
Copy link
Contributor

Why are these changes needed?

We hope to take Ray Serve to AntGroup and reuse the ability of Ray Serve in Ant's Ray Serving. In Ant, a large part of business scenarios come from Java developers, so Ray Serve is required to support Java backend.

In the milestone "[serve] Support Java Backend", we will enable Ray Serve to support Java Backend. Detailed design is in doc :https://docs.google.com/document/d/1b9VCZsC2jVhWw_c_ifMu_ED3NxkARcOnU-OFqUYu-r4/edit#heading=h.b3vvz7iwnixn

This PR is about the definition of Java Backend.

Related issue number

#15835

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@liuyang-my liuyang-my added enhancement Request for new feature and/or capability serve Ray Serve Related Issue labels Jun 1, 2021
@liuyang-my liuyang-my linked an issue Jun 1, 2021 that may be closed by this pull request
@liuyang-my
Copy link
Contributor Author

@jovany-wang

Copy link
Contributor

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

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

This looks great! I think the next step here that we need to start converting majority of the data classes (POJO classes) into protobuf types.

import java.io.Serializable;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make sure to convert this into protobuf in the next PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I'll design some plans about next PR this week.


this.hostActor = hostActor;
this.keyListeners = keyListeners;
this.snapshotIds = new ConcurrentHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@simon-mo
Copy link
Contributor

simon-mo commented Jun 8, 2021

@simon-mo
Copy link
Contributor

@liuyang-my ping about adding the tests. Thanks!

Copy link

@caitengwei caitengwei left a comment

Choose a reason for hiding this comment

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

LGTM

@simon-mo simon-mo merged commit 2c3ce46 into ray-project:master Jul 2, 2021
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we had upgraded guava to 30.0 to fix CVEs. The PR is #16650

Copy link
Contributor

Choose a reason for hiding this comment

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

@liuyang-my Can you also fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature and/or capability serve Ray Serve Related Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[serve] Define Java backend core API
4 participants