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

refactor: upgrade implementation of GRPC (from grpcio to tonic) #18

Merged
merged 12 commits into from
Nov 10, 2022

Conversation

archerny
Copy link
Contributor

@archerny archerny commented Nov 10, 2022

Which issue does this PR close?

Closes issue 240 in the main repo.
Closes #16

Rationale for this change

Tonic is a native gRPC implementation with these pros:

  • Native, and safety.
  • More users (compare to grpcio)
  • Lower memory consumption

What changes are included in this PR?

  1. Remove the dependency: grpcio.
  2. Reimplement the RpcClientImpl.
  3. Refactor RpcClientImplBuilder and renamed to RpcClientImplFactory.
  4. Refactor the hierarchy of the codes. DbClient Implementations for both the standalone mode and cluster mode was made to depend on the underlying InnerClient.

Are there any user-facing changes?

This PR just restructures the source code so as to improve maintainability without altering functionality.

How does this change test

Pass the existing CI.

src/rpc_client/rpc_client_impl.rs Outdated Show resolved Hide resolved
src/db_client/standalone.rs Outdated Show resolved Hide resolved
src/db_client/standalone.rs Outdated Show resolved Hide resolved
@archerny archerny changed the title refactor: replace the grpcio crate with tonic refactor: upgrade implementation of GRPC (from grpcio to tonic) Nov 10, 2022
src/model/write/request.rs Outdated Show resolved Hide resolved
src/rpc_client/rpc_client_impl.rs Outdated Show resolved Hide resolved
src/rpc_client/rpc_client_impl.rs Outdated Show resolved Hide resolved
src/rpc_client/mod.rs Outdated Show resolved Hide resolved
@Rachelint
Copy link
Contributor

Almost ok, just need some tiny fixes now.

Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM.

@archerny archerny merged commit 5f9c4f6 into apache:main Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade ceresdbproto to replace grpcio with tonic Try replace grpcio with tonic
2 participants