-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
rust: add demo Tonic server #4318
Merged
Merged
Commits on Nov 11, 2020
-
rust: add
tonic
dependency stackSummary: This includes: `tonic`, a gRPC framework; `tonic-build`, its compiler for protobuf bindings; `tokio`, an async runtime; and `async-stream`, `async-trait`, and `futures-core`, helpers for streaming gRPC methods. Test Plan: All crates build without any manual configuration: ``` bazel build //third_party/rust:{tonic{,_build},tokio,async_{stream,trait},futures_core} ``` wchargin-branch: rust-dep-tonic-stack wchargin-source: 0fa8ea005745e7194bde20da6fb1b9871c05822a
Configuration menu - View commit details
-
Copy full SHA for f3544ed - Browse repository at this point
Copy the full SHA f3544edView commit details -
rust: compile gRPC bindings with Tonic
Summary: This patch switches our Rust protocol buffer bindings from `prost-build` to `tonic-build`. This generates the same protobuf message types, since Tonic interoperates with Prost, but can now also generate gRPC stubs. Test Plan: Check the doc server to see that our existing proto types still look good, in the `rustboard_core::proto::tensorboard` package. We don’t have gRPC services to generate yet. A follow-up commit will add a demo server as proof of concept. wchargin-branch: rust-compile-grpc wchargin-source: c5090247a8a25c1902d4b42597ec4d4ae2593779
Configuration menu - View commit details
-
Copy full SHA for dacd2fe - Browse repository at this point
Copy the full SHA dacd2feView commit details -
Summary: This patch defines a simple “demo” service with one RPC, which adds a sequence of numbers. It includes a Tonic server for this service to demonstrate the end-to-end setup. Test Plan: In one shell, run `bazel run -c opt //tensorboard/data/server`. In another shell, use `grpc_cli` to send an RPC to localhost port 6789: ``` grpc_cli --channel_creds_type=insecure \ --protofiles tensorboard/data/server/demo.proto \ call localhost:6789 Demo.Add "term: 2 term: 2" ``` This should print a response like `sum: 4`. On my machine, it completes in 5.2 ± 2.6 ms (methodology: run `hyperfine` on the above command). This seems reasonably fast given that it has to establish a connection, whereas a Python gRPC client will keep a connection open. It’s also well below the 40ms magic number for `TCP_NODELAY` issues. wchargin-branch: rust-demo-tonic-server wchargin-source: 25d9fcbf2279742cdffde0c5357711244e9afef2
Configuration menu - View commit details
-
Copy full SHA for 155c40c - Browse repository at this point
Copy the full SHA 155c40cView commit details
Commits on Nov 12, 2020
-
wchargin-branch: rust-compile-grpc wchargin-source: 6d888a758d42d318467189245ebcc619acaefe9c
Configuration menu - View commit details
-
Copy full SHA for bb1f37a - Browse repository at this point
Copy the full SHA bb1f37aView commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: 2181a31c718433d5113cbb1fe2e51c7c98193cc1
Configuration menu - View commit details
-
Copy full SHA for 864fd26 - Browse repository at this point
Copy the full SHA 864fd26View commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: 2181a31c718433d5113cbb1fe2e51c7c98193cc1
Configuration menu - View commit details
-
Copy full SHA for d743728 - Browse repository at this point
Copy the full SHA d743728View commit details -
wchargin-branch: rust-compile-grpc wchargin-source: ba5e9a59b4b4f95e86b1f7a4a0b0d5c28c446476
Configuration menu - View commit details
-
Copy full SHA for 6a5ef83 - Browse repository at this point
Copy the full SHA 6a5ef83View commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: 89356565a9557266c069dcfdf0422f2e2225e3ab # Conflicts: # tensorboard/data/server/gen_protos_tool.rs
Configuration menu - View commit details
-
Copy full SHA for 984ad35 - Browse repository at this point
Copy the full SHA 984ad35View commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: 89356565a9557266c069dcfdf0422f2e2225e3ab
Configuration menu - View commit details
-
Copy full SHA for 3ef1476 - Browse repository at this point
Copy the full SHA 3ef1476View commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: eb0bce9732ce4810d7152ec6eb47ba67a8d85d5e # Conflicts: # tensorboard/data/server/gen_protos_tool.rs
Configuration menu - View commit details
-
Copy full SHA for 395bda0 - Browse repository at this point
Copy the full SHA 395bda0View commit details -
wchargin-branch: rust-demo-tonic-server wchargin-source: eb0bce9732ce4810d7152ec6eb47ba67a8d85d5e
Configuration menu - View commit details
-
Copy full SHA for 50fa124 - Browse repository at this point
Copy the full SHA 50fa124View commit details
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.