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

Protobuf + gRPC #20

Open
tiero opened this issue May 27, 2020 · 1 comment
Open

Protobuf + gRPC #20

tiero opened this issue May 27, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@tiero
Copy link

tiero commented May 27, 2020

Just asking here to see if there is some sort of conceptual ACK for starting working on this
romanz/electrs#227

It Would be nice if both implementations could expose a gRPC endpoint and the API could be defined by a typed schema.

Why?

  1. gRPC gives HTTP/2 for free
  2. http2 means binary encoding, more efficient than utf8 JSON strings
  3. Protobuf is a perfect match, could give backward and forward compatibility when making changes to the APIs
  4. Server-side streaming
  5. Automatically generate stubs and clients from the single .proto model spec
@shesek
Copy link
Collaborator

shesek commented May 27, 2020

A gRPC/protobuf interface is something that I'd be willing to accept. It should be put behind a compile-time flag, like the current http/electrum/webhooks flags.

Note that bwt already supports HTTP/2 (via warp/hyper) and already does server-side streaming using Server-Sent Events. The main advantages for me would be protobut instead of json and a more well-defined explicit interface.

I probably won't be prioritizing this myself in the near future, but will gladly review a PR.

@shesek shesek added the enhancement New feature or request label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants