Questions tagged [grpc]

A general RPC (Remote Procedure Call) framework over HTTP/2, initially developed at Google. gRPC is a language neutral and platform neutral framework that allows users to write applications where independent services can work with each other as if they were native. It uses Protocol Buffers as the interface description language.

Links

Related Tags

6316 questions
13
votes
3 answers

grpc go : how to know in server side, when client closes the connection

I am using grpc go i have an rpc which looks roughly like this 196 service MyService { 197 // Operation 1 198 rpc Operation1(OperationRequest) returns (OperationResponse) { 199 option (google.api.http) = { 200 post:…
weima
  • 4,653
  • 6
  • 34
  • 55
13
votes
6 answers

How to unit test grpc-java server implementation functions?

I have an implementation of GRPC-java server code, but I didn't find the example code to unit test the StreamObserver. Does anyone know the right way to unit test the function? public class RpcTrackDataServiceImpl implements…
Liang Zou
  • 173
  • 1
  • 1
  • 8
13
votes
2 answers

gRPC not generating interface for a service, only a service class

I am new to gRPC and have this problem: I created a .proto with rpc service definition. After compilation I get generated sources: all messages have a class that implements an interface. However a service itself doesn't implement any interface -…
Iwavenice
  • 556
  • 5
  • 22
12
votes
1 answer

gRPC - C++ Async HelloWorld Client Example doesn't do anything asynchronously

I am trying to learn how to use gRPC asynchronously in C++. Going over the client example at https://github.com/grpc/grpc/blob/v1.33.1/examples/cpp/helloworld/greeter_async_client.cc Unless I am misunderstanding, I don't see anything asynchronous…
Christopher Pisz
  • 3,757
  • 4
  • 29
  • 65
12
votes
2 answers

“BloomRPC” cannot be opened because the developer cannot be verified

After downloading BloomRPC from the github repo and running brew cask install bloomrpc, when I try to open the BloomRPC application I get "BloomRPC cannot be opened because the developer cannot be verified." I've tried going to Security and Privacy…
Victor Cui
  • 1,393
  • 2
  • 15
  • 35
12
votes
3 answers

Why multiprocess python grpc server do not work?

I instantiate one grpc server per subprocess by multiprocess pool. When I use multiple clients to access the server, I found the following two problems: all clients access same server subprocess client raise MaybeEncodingError By the way, my…
Long.zhao
  • 1,085
  • 2
  • 11
  • 16
12
votes
2 answers

How to Maintain Proto Files?

I've created 3 proto files and would like to keep it in a git repo: separated from all others files. The repository contains only .proto files. I have 3 microservices and each of them has their own repository that is using those proto files to…
softshipper
  • 32,463
  • 51
  • 192
  • 400
12
votes
2 answers

Load balancing gRPC requests using one of AWS Load Balancers

I'm trying to work out whether I could use one of the (A/E/N)LBs to load balance gRPC traffic. A simple round robin would suffice in our case. I've read that ALB doesn't fully support HTTP2 and therefore can't be used with gRPC. Specifically lack of…
sumek
  • 26,495
  • 13
  • 56
  • 75
12
votes
1 answer

HTTP/2 vs web-sockets for bidirectional message streaming

Besides for browsers, which do not expose HTTP/2 frames to Javascript, in what case would Websockets be a better choice than something like bidirectional streaming gRPCs (built on HTTP/2) for implementing real-time bidirectional message streams?…
Leeren
  • 1,931
  • 2
  • 20
  • 31
12
votes
1 answer

How to represent a JSON object variable with Proto definition

I want to define a request message in gRPC which should have a Json Object as a field For e.g. message UserRequest{ string name = 1; string city = 2; string email = 3; metainfo = 4;//A Json Object variable which can have any number…
pranay jain
  • 352
  • 1
  • 2
  • 15
12
votes
3 answers

Is it possible to have an API working with both REST and gRPC?

My goal is to try to put both to work as part of the incremental migration from a REST API to gRPC. We are going to start using gRPC as the way of communication between our services in our microservice architecture. The problem is that whenever I…
Nez
  • 121
  • 1
  • 4
12
votes
1 answer

grpc c++ async completion queue events

I am trying to understand the grpc c++ async model flow. This article (link ) already explains many of my doubts. Here is the code for grpc_asycn_server. To understand when CompletionQueue is getting requests, I added a few print statements as…
Debashish
  • 1,155
  • 19
  • 34
12
votes
2 answers

What are the command line arguments passed to grpc_tools.protoc

Even though every python grpc quickstart references using grpc_tools.protoc to generate python classes that implement a proto file, the closest thing to documentation that I can find simply says Given protobuf include directories $INCLUDE, an…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
12
votes
2 answers

Unable to make a connection between trivial C# gRPC client and server

I'm trying to get a basic gRPC C# client and server working using the .Net bindings for the official grpc library (version 1.20). But every time my client calls fail to reach the server with this error: Grpc.Core.RpcException:…
Matěj Zábský
  • 16,909
  • 15
  • 69
  • 114
12
votes
1 answer

How to load balance gRPC on AWS

I've been looking through this for a week and haven't been able to find anything that has helped me. I'll be upfront, I'm new to AWS so I'm sure things are flying over my head. Problem I am currently writing an application which is being deployed to…