zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Refactor zebra-grpc and rename it to zebra-scan-rpc

Open arya2 opened this issue 6 months ago • 0 comments

Motivation

Most of the code for zebra-grpc was initially written in a single module, we want to re-organize it into multiple modules, similar to the structure of zebra-rpc.

We also want to rename the crate to zebra-scan-rpc or zebra-scan-grpc so that:

  • it's next to the zebra-scan crate when sorted alphabetically, and
  • to hint that it's coupled with zebra-scan and that it only implements RPC methods for zebra-scan

tonic doesn't seem to support federated endpoints, but if we add a gRPC server to zebra-rpc and want to provide all of the RPC methods from a single endpoint, we can implement the zebra-scan-rpc service as a proxy in zebra-rpc so those calls are routed to the zebra-scan-rpc endpoint, and add the service like in this example.

Possible Design

See the changes here.

arya2 avatar Feb 07 '24 01:02 arya2