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
6
votes
2 answers

Deploy gRPC supporting application on AWS using ALB

I have two microservices communicating using gRPC.Both are docker applications deployed on ECS. How do I configure them to use AWS ALB?In documentation it says ALB supports HTTP/2, however I can only see HTTP1 settings. My application has one gRPC…
Surbhi
  • 163
  • 2
  • 13
6
votes
2 answers

gRPC: How to configure SSL in client?

Its new topic for me. I'm able to connect as plaintext. public ManagedChannel getChannel(String serviceName){ TSServiceClientManager scm = TSServiceManagementFactory.getInstance().getServiceClientManager(); TSServiceConnectionInfo connInfo =…
SOWMITHRA KUMAR G M
  • 1,320
  • 2
  • 11
  • 17
6
votes
1 answer

Which spring grpc boot starter project should I use?

We are at the beginning of developing with microservices using gRPC. Our microservices are designed to be run on JVM. Inside our persistence layer, we would like to use an ORM library. Spring Data JPA project looks very promising. But there are a…
The_Cute_Hedgehog
  • 1,280
  • 13
  • 22
6
votes
2 answers

java-grpc: How to increase the message size limit in a ManagedChannel?

Our communication exceeds the default grpc-java limit on the message size: Caused by: io.grpc.StatusRuntimeException: INTERNAL: Frame size 4555602 exceeds maximum: 4194304. If this is normal, increase the maxMessageSize in the channel/server…
Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239
5
votes
1 answer

GRPC client blocking vs async stub recommendation

We are currently implementing a high throughput spring boot application using grpc-starter package https://github.com/yidongnan/grpc-spring-boot-starter, this is a client server based application. We are migrating our legacy REST end points CRUD…
prassank
  • 135
  • 1
  • 9
5
votes
1 answer

Grpc throws deadline exceeded after negative number of seconds from now

First calls usually successful, but then I have exception with message like those: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: ClientCall started after deadline exceeded: -175.597476157s from now Why is the number of seconds negative? How do…
advortsov
  • 196
  • 2
  • 8
5
votes
2 answers

Clientside load balancing for grpc v1.34.1, nameResolverFactory is deprecated

I am using grpc v1.34.1 with Java and it's hard to configure client-side load balancing since some of the methods are deprecated in this version. It was pretty straightforward to configure client-side load balancing in an earlier version by: final…
Nitish Bhardwaj
  • 1,113
  • 12
  • 29
5
votes
3 answers

Can someone explain to me what's the proper usage of gRPC StreamObserver.onError?

I am trying to handle gRPC errors properly (Java, Spring-boot app). Basically, I need too transfer error details from gRPC server to client, but I find it hard to understand the proper usage of StreamObserver.onError(); The method doc…
gai-jin
  • 653
  • 2
  • 10
  • 24
5
votes
1 answer

Make client-side streaming synchronous/blocking in gRPC Java application

I would like to make client-side streaming blocking. The definition of that protocol can look like this: rpc RecordRoute(stream Point) returns (RouteSummary) {} As it's said in the documentation, for certain types of streaming call, it's only…
kkochanski
  • 2,178
  • 23
  • 28
5
votes
0 answers

error when migrating to latest version of Firebase/Firestore dependency

my app works perfectly fine when using the dependencies with this version as mention below, but when migrating to the latest version of Firestore dependency my app unable to add or delete data in Firestore, I know the lastest dependency don't need…
5
votes
2 answers

Transport failed error when using a Java based Grpc server with a C# based client

I am developing a java based Grpc server using spring boot (2.2.2) and the grpc-server-spring-boot-starter java library. My client application is a C# application (netcoreapp3.1). Both the applications run on my laptop for this test. This is my…
Aaron Dsouza
  • 121
  • 3
  • 9
5
votes
1 answer

How grpc-health-probe (gRPC health checking on Kubernetes) differentiates between liveness and readiness probes

I am writing one grpc service and using gRPC health checking on Kubernetes (https://github.com/grpc-ecosystem/grpc-health-probe). In my server, I added different implementation (one for liveness and other for readiness) of endpoints. I am wondering…
Abhay
  • 928
  • 1
  • 10
  • 28
5
votes
2 answers

Problem returning stream of responses from gRPC service to RESTful client

I am attempting to write a set of services that will provide a REST interface to external clients, while using gRPC/protobuf for inter-service communication internally. Spring Boot is being utilized to help with the background infrastructure…
Joseph Gagnon
  • 1,731
  • 3
  • 30
  • 63
5
votes
1 answer

Protobuf plugin for gradle does not generate service class

I try to build a gRPC and protobuf application in java with Gradle I followed the instruction from: https://github.com/grpc/grpc-java/blob/master/README.md The issue is that one file is not generated: *ServiceGrpc.java But the corresponding…
moguil
  • 83
  • 1
  • 7
5
votes
2 answers

keep track of the request queue in grpc server

GRPC server does queue the requests and serve them based on the maxWorker configuration which is passed when the sever starts up. How do I print the metric- number of items in the queue .? Essentially, I would like to keep track of the numbers of…
surya
  • 171
  • 2
  • 12