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

Migrate to tower-grpc #3951

Open
brson opened this issue Dec 18, 2018 · 4 comments
Open

Migrate to tower-grpc #3951

brson opened this issue Dec 18, 2018 · 4 comments
Labels
component/gRPC Component: gRPC help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@brson
Copy link
Contributor

brson commented Dec 18, 2018

The gRPC stack tikv is on is unloved and it looks like the future of gRPC in Rust is https://github.com/tower-rs/tower-grpc. Let's start migrating in that direction.

There will be many unknowns here, upstream contributions needed, benchmarking, careful regression testing.

@brson brson self-assigned this Dec 18, 2018
@siddontang
Copy link
Contributor

siddontang commented Dec 19, 2018

This is a great idea! Hope @carllerche can help us :-)

If we really want to do this, at first, I guess we need to do a benchmark comparing the C gRPC and tower gRPC.

@siddontang
Copy link
Contributor

To add tower-rs to TiKV, we may:

  1. Generate the related server code with tower gRPC from our proto kvproto.
  2. Add a new port for TiKV (maybe 20181) for the tower gRPC so both two gRPC can run at the same time.
  3. Try to support some basic APIs like RawPut, RawGet.
  4. Try to let two TiKV communicate through tower gRPC. We can assume that if the remote TiKV port is 20160, the tower port is 20161(20160 + 1)

For 3 and 4, maybe the most problem for us is how to handle two different protobuf libraries, now we heavily depend on rust-protobuf, but tower uses prost, migrating to prost will change lots of code and take a long time.

@siddontang siddontang added type/enhancement The issue or PR belongs to an enhancement. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Dec 19, 2018
@ice1000 ice1000 added the component/gRPC Component: gRPC label Dec 19, 2018
@brson brson removed their assignment Jan 23, 2019
@brson
Copy link
Contributor Author

brson commented Jan 23, 2019

@ice1000 I've unassigned myself since I don't think I'll be involved in this.

@siddontang
Copy link
Contributor

I think at first we can migrate rust-protobuf to prost, then we can try tower-grpc easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/gRPC Component: gRPC help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants