Skip to content

Instantly share code, notes, and snippets.

@rdebeasi
Last active January 10, 2019 19:07
Show Gist options
  • Save rdebeasi/4d337990c2ae79117ccbc388b2904da8 to your computer and use it in GitHub Desktop.
Save rdebeasi/4d337990c2ae79117ccbc388b2904da8 to your computer and use it in GitHub Desktop.
Research on client-server communication with gRPC

Java / Spring Boot ecosystem

JavaScript / Node.js ecosystem

gRPC Gateway

  • gateway repo
  • Streaming support is mixed:
    • Supported: "Mapping streaming APIs to newline-delimited JSON streams"
    • Not supported: "True bi-directional streaming"
  • The readme lists other supported / not supported features

This tool generates golang code. You could probably use it alongside other languages, but it's unclear how to do so: all the example code is in golang. See this issue on Java support.

gRPC Gateway hit 1.0 in 2016 and is actively maintained. There isn't a ton of documentation on this toolset, though, and grpc-web seems like the way forward.

This repo is in the "grpc-ecosystem" org.

grpc-web

grpc-web hit 1.0 in October 2018, so there's a limited amount of info on Stack Overflow. Post-1.0 issues like "index.js is missing" don't give me great confidence that grpc-web is actually stable yet.

The clent requires an Envoy gateway. This is definitely the future, but Envoy won't be an official, supported part of OpenShift until OpenShift 4.0.

This repo is in the main "grpc" org. The web quickstart uses grpc-web. While this tool is new, it also appears to be the way forward for connecting clients to gRPC servers.

gRPC general

  • Protobuf method names are free-form and typically include a verb (e.g, GetFeature, ListFeatures, RecordRoute), so consider following something like Google Cloud's naming conventions.
  • The tutorials on grpc.io cover the basics for each language, but there are no intermediate or advanced tutorials. There are only auto-generated reference docs and a couple of iOS/Android sample apps.

Case studies / Articles

Alternatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment