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

4200 questions
279
votes
3 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
  • 3,851
  • 3
  • 16
  • 21
152
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)…
Mark Kahn
  • 81,115
  • 25
  • 161
  • 212
122
votes
3 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
  • 5,002
  • 6
  • 50
  • 71
107
votes
2 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
  • 6,002
  • 4
  • 40
  • 73
101
votes
4 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
  • 8,910
  • 11
  • 56
  • 125
89
votes
2 answers

What is 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,231
  • 1
  • 13
  • 21
79
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
  • 967
  • 1
  • 8
  • 10
63
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
  • 6,731
  • 5
  • 36
  • 57
49
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
  • 909
  • 1
  • 7
  • 12
48
votes
6 answers

Using Spring Boot together with gRPC and Protobuf

Anyone having any examples or thoughts using gRPC together with Spring Boot?
Markus
  • 721
  • 2
  • 6
  • 7
46
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
  • 6,083
  • 8
  • 37
  • 74
46
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,055
  • 1
  • 10
  • 20
37
votes
2 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
  • 4,350
  • 4
  • 25
  • 45
32
votes
9 answers

Why do I get this GRPC Error "WARNING: EmulatorService.cpp:448: Cannot find certfile" when I start the emulator?

Good evening everyone, I have only been dealing with Java and Android Studio for a few months, can someone help me to solve this error? It occurs every time the emulator starts. Thank you Emulator: Started GRPC server at 127.0.0.1:8554 Emulator:…
user12927500
31
votes
2 answers

protoc not generating service stub files

I have just started playing with google proto. When I try to compile proto file present in proto-java example, it does not generate any grpc file. proto…
Raman Sonkhla
  • 311
  • 1
  • 3
  • 3
1
2 3
99 100