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
2
votes
1 answer

gRPC client-side streaming with initial arguments

I'm creating client side streaming method which proto file definition should be looking similar to this: service DataService { rpc Send(stream SendRequest) returns (SendResponse) {} } message SendRequest { string id = 1; bytes data =…
Milos
  • 1,353
  • 2
  • 18
  • 37
2
votes
1 answer

C library for gRPC

I have not found support of the C language on grpc.io. Are there any "unofficial" libraries supporting gRPC in C? My whole project is in C. I'm seeing a few options: rewrite in C++ (inefficient, just to support gRPC) write module talking gRPC in…
Mark
  • 6,052
  • 8
  • 61
  • 129
2
votes
3 answers

How to set google.protobuf.Timestamp to null?

How to represent a null timestamp in Google ProtoBuf? I am reading DateTime's from a postgreSQL database--some of which are null--into protobuf TimeStamps. message test { google.protobuf.TimestampValue TransactionTime =1; } Unfortunately, there…
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
2
votes
1 answer

How to stop listening on a stream in python gRPC client

I am listening in a python thread on a gRPC stream that never ends: responses = some_grpc_stub.FunctionThatReturnsStream() for response in responses: on_event(response) I want to do this for a while, and then stop listening, so that on_event…
Diogenes Creosote
  • 1,922
  • 2
  • 17
  • 22
2
votes
0 answers

How do I correctly shutdown all gRPC channels and connections?

I have a Unity game, implementing a gRPC client that is generated from the protobuf compiler. While the game is running, I can receive all the data I need from the streaming call, and interact with that data perfectly. The issue I have is in the…
Predominant
  • 1,460
  • 12
  • 24
2
votes
0 answers

How to pass request context to GRPC Go endpoints from Ruby

I'm calling GRPC endpoints from Ruby. The proto endpoints are for example rpc SayHello (HelloRequest) returns (HelloReply), and implemented in Go, so they take context when calling from Go. The generated client supports client.SayHello(ctx…
onepiece
  • 3,279
  • 8
  • 44
  • 63
2
votes
2 answers

How to handle RpcException in NestJS

I am trying to build a NestJS backend with multiple microservices and one REST API as a Gateway which communicates with the microservices. For communication between the Gateway and Microservices I am using gRPC. Simple communication is already…
davidrui6
  • 31
  • 1
  • 4
2
votes
1 answer

gRPC / C++- How to leave server streaming rpc on

Hello I have this code: Status ListFeatures(ServerContext* context, const Rectangle* rectangle, ServerWriter* writer) override { auto lo = rectangle->lo(); auto hi = rectangle->hi(); long left =…
Venelin
  • 2,905
  • 7
  • 53
  • 117
2
votes
2 answers

Best way to have proto folder for multiple platform

What is the best practice to hold proto folder for multiple platform, such as backend, iOS, Android, and Web? I came up with 3 ideas. Which one would be the best? Do you know better ideas than them? 1st: Should I have all in 1 repository including…
Pytan
  • 1,138
  • 11
  • 28
2
votes
1 answer

Nestjs | grpc : How to handle remote error from client side

Remote Server @Catch(RpcException) export class RpcExceptionHandler implements RpcExceptionFilter { catch(exception: RpcException, host: ArgumentsHost): Observable { return throwError(exception.getError()); …
AMit SiNgh
  • 325
  • 4
  • 17
2
votes
0 answers

ESPv2 with Google Cloud Endpoints using gRPC returning "The current request is not defined"

I'm trying to get ESPv2 with Cloud Endpoints working to proxy to a service using gRPC. (We've been already extensively using ESPv2 with OpenApi, but this is the first gRPC service we're trying to use it with.) Here is what I did: I have a proto…
2
votes
1 answer

protobuf with grpc for Go in split packages

I'm trying to make my Go project using hexagonal architecture as described here. In my project I'm using a gRPC communication generated with protoc from .proto file. The directories structure: |- grpc.proto |-internal |-core |-domain …
Dysproz
  • 165
  • 8
2
votes
2 answers

Issue with Unmarshalling GRPC Response To Generic Type

I am trying to use generics to convert a JSON object into a GRPC response that has an enum, i.e.: type GRPCResponse { str string enu EnumType } type EnumType int32 const ( Type1 EnumType = 0 Type2 EnumType = 1 ) The function for…
Alaska
  • 341
  • 2
  • 9
2
votes
2 answers

gRPC streaming call which takes longer than 2 minutes is killed by hardware (routers, etc.) in between client and server

Grpc.Net client: a gRpc client sends large amount of data to a gRpc server after the gRpc server receives the data from the client, the http2 channel becomes idle (but is open) until the server returns the response to the client the gRpc server…
2
votes
1 answer

gRPC client side reconnection logic causing duplicate streams to be opened server side

I have a gRPC client that uses two bidi streams. For reasons unknown at the present, when we send a keepAlive ping every hour, onError with a statusRuntimeException are called on both streams. To handle the reconnection, I've implemented the…
omri
  • 352
  • 2
  • 18