Questions tagged [grpc-java]

Java version of general RPC (Remote Procedure Call) framework over HTTP/2.

Links

What is gRPC?

In gRPC a client application can directly call methods on a server application on a different machine as if it was a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client has a stub (referred to as just client in some languages) that provides the same methods as the server.

By default gRPC uses protocol buffers, Google’s mature open source mechanism for serializing structured data (although it can be used with other data formats such as JSON). As you’ll see in our example below, you define gRPC services using proto files, with method parameters and return types specified as protocol buffer message types. You can find out lots more about protocol buffers in the Protocol Buffers documentation.

863 questions
4
votes
1 answer

How to Access attributes from grpc Context.current()?

Would it be possible to access context attributes of a grpc call from the rpc method definition? I have written a Server Interceptor which is something similar to this @Override public ServerCall.Listener
chandan
  • 964
  • 1
  • 19
  • 26
4
votes
2 answers

Docker - Problem with java netty_tcnative

I am trying to dockerize 4 services and I have a problem with one of the services. Particularly, this service is implemented is spring boot service and uses google vision API. When building the images and starting the containers everything works…
Mr. D
  • 657
  • 1
  • 8
  • 21
4
votes
1 answer

Maven and java: how to generate code from protobuf files in test directory?

My question is very similar to this question but for maven and java. I am testing grpc, and want to put to a simple helloworld.proto in the test/proto folder. However the file doesn't generate a java file (unlike the proto file in…
apadana
  • 13,456
  • 15
  • 82
  • 98
4
votes
1 answer

GRPC Java logging in tests

So, I am using grpc-testin library to make some integration tests. When I use this code: @Rule public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); @Test public void doTest() throws IOException { String serverName =…
Bojan Vukasovic
  • 2,054
  • 22
  • 43
4
votes
1 answer

How can I transfer a detail exception message within gRPC's responseObserver.onError()

I'm trying to transfer a detail message that describe the exception with gRPC. I've learned that I should use responseObserver.onError to transfer it, and gRPC offer Metadata to do it, but I still don't know where to put it because i can't create a…
Long.zhao
  • 1,085
  • 2
  • 11
  • 16
4
votes
2 answers

How to check number of gRPC requests hits?

A Java gRPC server is running as a container in kubernetes, I am not able to figure out how to check the total number of gRPC requests hits to this server. It isn't equal to the number of successful hits, maybe the server is down and not able to…
abhilash_goyal
  • 711
  • 1
  • 10
  • 31
4
votes
3 answers

How to create a kubernetes container and run it from another pod

I have a grpc micro-service A running in kubernetes cluster. When this service is called, I would like to create an instance of another grpc micro-service B and run it in the same cluster. I have the image of the second service included in the…
Madhu
  • 109
  • 2
  • 13
4
votes
1 answer

How to intercept Grpc responses sent by a GrpcServer

I am new to Grpc world. As of now I know that I can intercept Requests received by a server by implementing ServerInterceptor interface. How to intercept the response generated by the server?
user3365463
  • 41
  • 1
  • 3
4
votes
1 answer

GRPC connection state listeners Java

I'm interesting - could i have some notifies about connection/disconnection events for GRPC client/server? Now, when client terminates connection to server i'm getting exception on server: июн 22, 2018 9:34:47 AM io.grpc.netty.NettyServerTransport…
NewJ
  • 379
  • 3
  • 15
4
votes
2 answers

grpc Logger level

I have an application (Java), which is depending heavily on grpc to communicate between different microservices. The problem is that in a cloud environment the calling services very often do not reach their target services. In order to resolve our…
skal
  • 155
  • 1
  • 2
  • 11
4
votes
1 answer

what is the meaning of "Value" class in .proto file

can someone please explain me the meaning of "Value" in below .proto file? message Test { string id = 1; string name = 2; google.protobuf.Value property = 6;}
Ashlin Karkada
  • 1,320
  • 1
  • 12
  • 20
4
votes
1 answer

How to implement Grpc username/password authentication. Python client, Java server

I'm trying to figure out how to authenticate with username/password when I create a connection and nothing found. So, my questions: How to create a server with username/password authentication on java server? How should python client connect to…
creedqq
  • 302
  • 4
  • 15
4
votes
2 answers

HTTP/2 h2 with no ALPN support in server

After reading both HTTP/2 RFC (#7540) and TLS-ALPN RFC (#7301), I'm still unable to figure out the expected behavior when ALPN is lacking in one end. Assuming I have a client that uses HTTP/2 "h2" (over TLS) that talks to a server that support…
Cowabunga
  • 306
  • 2
  • 12
4
votes
2 answers

Can gRPC server reclaim the DEADLINE_EXCEEDED thread immediately?

Is it right to say that - java gRPC server thread will still run even after the DEADLINE time. But, gRPC server will stop/block that thread only from making any subsequent gRPC calls since the DEADLINE time has crossed? If the above is a correct…
Venkata Naresh
  • 377
  • 1
  • 2
  • 9
4
votes
1 answer

How to intercept the headers from in call to one service and insert it to another request in gRPC-java?

I have two servers - HelloServer and WorldServer. Both implement the same proto file: // The greeting service definition. service GreeterService { // Sends a greeting rpc GreetWithHelloOrWorld (GreeterRequest) returns (GreeterReply) {} …
user2237511
  • 1,089
  • 2
  • 13
  • 20