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
19
votes
3 answers

How to enable server side SSL for gRPC?

New to gRPC and couldn't really find any example on how to enable SSL on the server side. I generated a key pair using openssl but it complains that the private key is invalid. D0608 16:18:31.390303 Grpc.Core.Internal.UnmanagedLibrary Attempting to…
qmo
  • 3,128
  • 3
  • 17
  • 23
19
votes
3 answers

How to add metadata to nodejs grpc call

I'd like to know how to add metadata to a nodejs grpc function call. I can use channel credentials when making the client with var client = new proto.Document('some.address:8000', grpc.credentials.createInsecure() ) Which are send when using…
Trent
  • 571
  • 1
  • 7
  • 15
19
votes
3 answers

Pagination in gRPC

I'm using gRPC to paginate a call and am trying to figure out the options for doing it/approximation for it. Is this a sensible question to ask? What are some resources I can use to do this?
sparkFinder
  • 3,336
  • 10
  • 42
  • 57
19
votes
3 answers

How can we use gRPC with Flatbuffers?

I have been studying about Apache Thrift, ProtoBuf and Flatbuffers. I found the tutorial to use gRPC with protobuf at link but I am not finding any documentation to use gRPC with Flatbuffers. Can some one point me to the relevant documentation? I…
GawdePrasad
  • 623
  • 1
  • 7
  • 15
18
votes
1 answer

gRPC: Random CANCELLED exception on RPC calls

I'm occasionally getting cancellation errors when calling gRPC methods. Here's my client-side code (Using grpc-java 1.22.0 library): public class MyClient { private static final Logger logger = LoggerFactory.getLogger(MyClient.class); …
hylowaker
  • 966
  • 2
  • 9
  • 24
18
votes
9 answers

Protobuf timestamp not found

Relatively new to GRPC and getting an error in my proto file that I cannot seem to make sense of. I would like to send a time in a message using the "google.protobuf.Timestamp". I cannot seem to import it. What am I doing wrong? syntax =…
mornindew
  • 1,993
  • 6
  • 32
  • 54
18
votes
2 answers

How to use a prototbuf map in Python?

Given a proto definition message EndpointResult { int32 endpoint_id = 1; // property id as key map properties = 2; } message TimeSeries { repeated TimeEntry value = 2; } message TimeEntry { int32 time_unit =…
Edgar H
  • 1,376
  • 2
  • 17
  • 31
18
votes
6 answers

Grpc.Core.RpcException method is unimplemented with C# client and Java Server

I am having trouble finding the source of this error. I implemented a simple service using protobuf: syntax = "proto3"; package tourism; service RemoteService { rpc Login(LoginUserDTO) returns (Response) {} } message AgencyDTO{ int32 id=1; …
Alexandru Cancescu
  • 829
  • 1
  • 9
  • 19
18
votes
7 answers

How to use predifined protobuf type (i.e. "google/protobuf/timestamp.proto") with gRPC

I'm trying to use google/protobuf/timestamp.proto in with gRPC plugin and Go. This is how I run protoc: protoc -I ./ ./*.proto --go_out=plugins=grpc:. And this is my .proto: #domain.proto syntax = "proto3"; option java_multiple_files =…
Adrian
  • 1,973
  • 1
  • 15
  • 28
18
votes
1 answer

gRPC/Protobuf 3 syntax: what is the difference between rpc lines that end with semicolon vs '{}'?

I've seen two different ways of declaring an gRPC service using Protobuf v3. Some code has the rpc line end with a semicolon (such as the current proto3 documentation): service SearchService { rpc Search (SearchRequest) returns…
psanford
  • 5,580
  • 1
  • 26
  • 25
17
votes
2 answers

gRPC call, channel, connection and HTTP/2 lifecycle

I read the gRPC Core concepts, architecture and lifecycle, but it doesn't go into the depth I like to see. There is the RPC call, gRPC channel, gRPC connection (not described in the article) and HTTP/2 connection (not described in the article). I'm…
Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219
17
votes
2 answers

Using Protobuf classes vs having a mapping framework/layer in Java

I couldn't find any "Best Practices" online for usage of gRPC and protobuf within a project. I'm implementing an event-sourced server side app. The core defines the domain aggregates, events and services without having external dependencies. The…
hsen
  • 435
  • 5
  • 13
17
votes
3 answers

Using cmake to create protobuf / grpc cc files

If I want to recreate the following protoc command in cmake: protoc -I ../proto/ --cpp_out=. service.proto I use the following lines in cmake: file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources…
16
votes
0 answers

How is a gRPC queue managed? is there a size limitation for a gRPC queue?

I am trying to understand how gRPC queues are managed and if there are any size limitations on gRPC queue size. According to this SO post requests are queued: If your server already processing maximum_concurrent_rpcs number of requests…
honor
  • 7,378
  • 10
  • 48
  • 76
16
votes
1 answer

Handling Context Cancelled errors

I am new to Go and still learning it every signle day. I see a lot of context cancelled error in our project which is kind of annoying me. So i was thinking to dig a little deeper to figure out whats going on. If I am not wrong, in "simple" terms,…
Em Ae
  • 8,167
  • 27
  • 95
  • 162