-1

I'm starting a new gRPC project that needs to be production ready early next year. We've been discussing about moving over to Project Loom when it stabilizes. As most of the work is around infra, rewriting code is not a huge risk in case Loom and the ecosystem is not in good enough shape.

Anyway, I noticed that Helidon Nima supports gRPC which we use for server-to-server communication. I could not find a single example anywhere for how to wire it up to a working example. Does anyone have any pointers?

eof
  • 413
  • 4
  • 14

1 Answers1

2

This question was also posted in https://github.com/helidon-io/helidon/issues/7005 and will also post the response here:

You can find a full example here: https://github.com/helidon-io/helidon/tree/main/examples/nima/protocols

It uses multiple protocols with our webserver, including GRPC

Short summary:

  • we use the same server to server HTTP and grpc, and it indeed requires HTTP/2 server
  • you can add a routing for grpc:
WebServer.builder()
      .addRouting(GrpcRouting.builder()
          .unary(Strings.getDescriptor(),
              "StringService",
              "Upper",
              ProtocolsMain::grpcUpper))
     .build()
     .start()
kluster
  • 111
  • 2