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
368
votes
4 answers

Why required and optional is removed in Protocol Buffers 3

I'm recently using gRPC with proto3, and I've noticed that required and optional has been removed in new syntax. Would anyone kindly explain why required/optional are removed in proto3? Such kind of constraints just seem necessary to make definition…
yjzhang
  • 4,859
  • 3
  • 19
  • 21
222
votes
3 answers

Can I define a grpc call with a null request or response?

Does the rpc syntax in proto3 allow null requests or responses? e.g. I want the equivalent of the following: rpc Logout; rpc Status returns (Status); rpc Log (LogData); Or should I just create a null type? message Null {}; rpc Logout (Null)…
user578895
193
votes
6 answers

protobuf vs gRPC

I try to understand protobuf and gRPC and how I can use both. Could you help me understand the following: Considering the OSI model what is where, for example is Protobuf at layer 4? Thinking through a message transfer how is the "flow", what is…
lony
  • 6,733
  • 11
  • 60
  • 92
140
votes
3 answers

Is gRPC(HTTP/2) faster than REST with HTTP/2?

The goal is to introduce a transport and application layer protocol that is better in its latency and network throughput. Currently, the application uses REST with HTTP/1.1 and we experience a high latency. I need to resolve this latency problem and…
Lakshman Diwaakar
  • 7,207
  • 6
  • 47
  • 81
134
votes
2 answers

What is the difference between grpc and websocket? Which one is more suitable for bidirectional streaming connection?

I want to develop a client-server application in a bi-directional streaming manner. what is more suitable technology for this, grpc or websocket?
prashant sindhu
  • 1,769
  • 2
  • 15
  • 25
112
votes
6 answers

How is GRPC different from REST?

I'm reading this explanation of GRPC and this diagram is of interest: How does the transport layer work? If it's over the network... why is it called an RPC? More importantly, how is this different from REST that implements an API for the…
Jwan622
  • 11,015
  • 21
  • 88
  • 181
93
votes
8 answers

Testing a gRPC service

I'd like to test a gRPC service written in Go. The example I'm using is the Hello World server example from the grpc-go repo. The protobuf definition is as follows: syntax = "proto3"; package helloworld; // The greeting service definition. service…
joscas
  • 7,474
  • 5
  • 39
  • 59
83
votes
19 answers

Error "protoc-gen-go: program not found or is not executable"

I am trying to build a sample application with Go gRPC, but I am unable to generate the code using "protoc" I have installed the required libraries and Go packages using: go get -u google.golang.org/grpc go get -u…
Mayank Gupta
  • 1,779
  • 1
  • 13
  • 19
82
votes
8 answers

How to bring a gRPC defined API to the web browser

We want to build a Javascript/HTML gui for our gRPC-microservices. Since gRPC is not supported on the browser side, we thought of using web-sockets to connect to a node.js server, which calls the target service via grpc. We struggle to find an…
Oliver
  • 1,007
  • 1
  • 9
  • 10
70
votes
5 answers

Unable to install grpcio using pip install grpcio

I am getting error while installing grpcio using pip install grpcio on my windows machine.I read here - https://github.com/grpc/grpc/issues/17829 that it may be due to error in a version of setuptools. I upgraded my setuptools to the latest version…
ssbb191
  • 1,486
  • 3
  • 12
  • 23
69
votes
2 answers

grpc and zeromq comparsion

I'd like to compare somehow capabilities of grpc vs. zeromq & its patterns: and I'd like to create some comparsion (feature set) - somehow - 0mq is "better" sockets - but anyways - if I apply 0mq patterns - I get comparable 'frameworks' I think -…
user3169252
  • 1,139
  • 1
  • 9
  • 13
60
votes
3 answers

REST vs gRPC: when should I choose one over the other?

I see more and more software organizations using gRPC in their service-oriented architectures, but people are also still using REST. In what use cases does it make sense to use gRPC, and when does it make sense to use REST for inter-service…
nmurthy
  • 1,337
  • 1
  • 12
  • 24
60
votes
8 answers

Using Spring Boot together with gRPC and Protobuf

Anyone having any examples or thoughts using gRPC together with Spring Boot?
Markus
  • 941
  • 2
  • 8
  • 7
55
votes
4 answers

Pattern for rich error handling in gRPC

What is the pattern for sending more details about errors to the client using gRPC? For example, suppose I have a form for registering a user, that sends a message message RegisterUser { string email = 1; string password = 2; } where the email…
mindvirus
  • 5,016
  • 4
  • 29
  • 46
53
votes
13 answers

NodeJs Error - Failed to load gRPC binary module because it was not installed for the current system Expected directory?

I am running my NodeJs App and i am getting an error. sudo /usr/local/bin/node app.js Error: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v57-linux-x64-glibc Found:…
Sudhanshu Gaur
  • 7,486
  • 9
  • 47
  • 94
1
2 3
99 100