-
Notifications
You must be signed in to change notification settings - Fork 72
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
Migrate scala control messages to protobuf #2950
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…xera into shengquan-rpc-refactor
shengquan-ni
force-pushed
the
shengquan-rpc-refactor
branch
2 times, most recently
from
October 20, 2024 23:32
8d5f5eb
to
9922c15
Compare
Yicong-Huang
approved these changes
Oct 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Had some tests locally and left some comments in code.
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/architecture/rpc/controlcommands.proto
Outdated
Show resolved
Hide resolved
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/architecture/rpc/controlcommands.proto
Show resolved
Hide resolved
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/architecture/rpc/controlreturns.proto
Outdated
Show resolved
Hide resolved
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/architecture/rpc/controlreturns.proto
Outdated
Show resolved
Hide resolved
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/common/actormessage.proto
Show resolved
Hide resolved
core/amber/src/main/protobuf/edu/uci/ics/amber/engine/architecture/rpc/controlreturns.proto
Show resolved
Hide resolved
core/amber/src/main/python/core/architecture/handlers/actorcommand/backpressure_handler.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Had some tests locally and left some comments in code.
...src/main/scala/edu/uci/ics/amber/engine/architecture/messaginglayer/WorkerTimerService.scala
Outdated
Show resolved
Hide resolved
core/amber/src/main/python/core/architecture/handlers/control/control_handler_base.py
Show resolved
Hide resolved
...i/ics/amber/engine/architecture/controller/promisehandlers/TakeGlobalCheckpointHandler.scala
Show resolved
Hide resolved
core/amber/src/main/python/core/architecture/handlers/control/no_op_handler.py
Show resolved
Hide resolved
core/amber/src/main/python/core/architecture/handlers/control/resume_worker_handler.py
Show resolved
Hide resolved
core/amber/src/main/python/core/architecture/rpc/async_rpc_server.py
Outdated
Show resolved
Hide resolved
core/amber/src/main/python/core/runnables/test_console_message.py
Outdated
Show resolved
Hide resolved
…xera into shengquan-rpc-refactor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates all Scala control messages and their corresponding handlers to use gRPC.
Main Changes (For both Scala and Python Engine)
Rewrote
AsyncRPCServer
andAsyncRPCClient
Centralized RPC Definitions
Steps to Create New RPCs
controlcommands.proto
with all necessary inputs.controlreturns.proto
.controllerservice.proto
.workerservice.proto
.protocGenerate
in the SBT shell../scripts/python-proto-gen.sh
fromcore
folder.ControllerAsyncRPCHandlerInitializer
orWorkerAsyncRPCHandlerInitializer
, and move it to thepromisehandlers
folder for better organization.python/core/architecture/handlers/control
and override correspondingasync
method for the new rpc defined in worker service.Changes in Sending RPCs (Scala Engine)
Example: Using the
StartWorkflow
RPC, which is handled by the controller.Before this PR:
After this PR: