How to debug grpc call?

You can set the GRPC_TRACE environment variable to all to have grpc dump a whole bunch of data about what the connection is doing: export GRPC_TRACE=all edit from comment: apparently you also need to set: export GRPC_VERBOSITY=DEBUG

Pattern for rich error handling in gRPC

Include additional error details in the response Metadata. However, still make sure to provide a useful status code and message. In this case, you can add RegisterUserResponse to the Metadata. In gRPC Java, that would look like: Metadata.Key<RegisterUserResponse> REGISTER_USER_RESPONSE_KEY = ProtoUtils.keyForProto(RegisterUserResponse.getDefaultInstance()); … Metadata metadata = new Metadata(); metadata.put(REGISTER_USER_RESPONSE_KEY, registerUserResponse); responseObserver.onError( Status.INVALID_ARGUMENT.withDescription(“Email or password malformed”) .asRuntimeException(metadata)); … Read more

REST vs gRPC: when should I choose one over the other?

When done correctly, REST improves long-term evolvability and scalability at the cost of performance and added complexity. REST is ideal for services that must be developed and maintained independently, like the Web itself. Client and server can be loosely coupled and change without breaking each other. RPC services can be simpler and perform better, at … Read more

Using Spring Boot together with gRPC and Protobuf

If it’s still relevant for you, I’ve created gRPC spring-boot-starter here. grpc-spring-boot-starter auto-configures and runs the embedded gRPC server with @GRpcService-enabled beans. The simplest example : @GRpcService(grpcServiceOuterClass = GreeterGrpc.class) public static class GreeterService implements GreeterGrpc.Greeter { @Override public void sayHello(GreeterOuterClass.HelloRequest request, StreamObserver<GreeterOuterClass.HelloReply> responseObserver) { // omitted } } There is also an example of how … Read more

grpc and zeromq comparsion

async req / res communication (inproc or remote) between nodes Both libraries allow for synchronous or asynchronous communication depending on how to implement the communication. See this page for gRPC: http://www.grpc.io/docs/guides/concepts.html. Basically gRPC allow for typical HTTP synchronous request/response or a ‘websocket-like’ bidirectional streaming. For 0mq you can setup a simple REQ-REP connection which is … Read more