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
0 answers

AttributeError: 'NoneType' object has no attribute 'enum_types_by_name'

I am trying to run this code sample code import streamlit as st from PIL import Image import pandas as pandas from clarifai_grpc.grpc.api import service_pb2, resources_pb2 from clarifai_grpc.grpc.api.status import status_code_pb2 from…
Safee987
  • 39
  • 4
2
votes
1 answer

This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer headers. Please update your headers

I want to create a .so file from my grpc client so that I could run it from another function. when I add the line add_library(client_lib client.cc) at the end of my CMakeLists.txt I get this error: while it is working correctly without that…
sama
  • 333
  • 2
  • 11
2
votes
0 answers

Function to create GRPC server with generic protobuf service and generic tower layer parameters

I'm writing a function fn run_grpc_server(service: S, layer: L) -> Result<(), String> where I need to provide generic parameter for protobuf service S and tower layer L, so I can build the GRPC server combining them. To illustrate, I modify…
bits
  • 1,595
  • 1
  • 17
  • 17
2
votes
0 answers

Validate GRPC request parameters : .Net Core

What is the best approach to validate the GRPC input request? In the below example, we need to validate both fields, as these are required fields. For example: message AudienceRequest { int32 id = 1; string name = 1; }
2
votes
1 answer

gRPC bidirectional streaming versus back to back HTTP call

I saw recently an article where we are using bidirectional streaming calls for exchanging business data and not only for uploading/downloading. Then a question occurred to me: is this model viable in replacement of API backend to backend HTTP…
Loïc Madiès
  • 277
  • 1
  • 5
  • 19
2
votes
1 answer

Sending protobuf-encoded metadata with a stream

Questions about attaching a piece of metadata (an "initial" request) when initiating a client-side streaming gRPC have already been asked before (here, here), but some answers are suggesting that it's not possible and suggest using oneof where first…
shooqie
  • 950
  • 7
  • 17
2
votes
0 answers

What is the best practice to trace a GRPC stream message

I'm trying to use OpenTelemetry to trace the microservices I'm working on. The services build up some long running gRPC stream connections with each other and send payload messages in the stream. The gRPC stream's lifespan is as long as the whole…
2
votes
0 answers

error code: StatusCode.UNIMPLEMENTED - Jaeger - Opentelemetry

I'm currently setting up Jaeger SPM (service performance metrics) on my application. Below is the code and setup that I'm using, currently failing with Failed to export traces, error code: StatusCode.UNIMPLEMENTED. What am I missing in my…
Corfucinas
  • 353
  • 2
  • 11
2
votes
2 answers

returning the grpc status code in case of success

I have a grpc handler Something(ctx context.Context, request *protocol.Something) (*pb.Test, error) I return errors like return nil, status.Error(codes.InvalidArgument, "something wrong") In case of success. I always return nil return test, nil,…
nakem
  • 356
  • 2
  • 8
2
votes
1 answer

C# Protobuf Disable Null Checks

I have a proto file with this: message Group { string name = 1; string id = 2; } and the generate code (using Grpc.Tools) gives me code like this for setting…
Zeus82
  • 6,065
  • 9
  • 53
  • 77
2
votes
1 answer

Use ruby grpc client with self signed certificate

Trying to use ruby GRPC client to connect to a go GRPC server. The server uses TLS credentials with self signed certificates. I have trusted the certificate on my system (ubuntu 20.04) but still getting Handshake failed with fatal error…
florind
  • 487
  • 4
  • 4
2
votes
0 answers

Deserializing gRPC message

Problem I intercepted a gRPC network request from an application, and I intend to modify the contents and resend the message programmatically. As no tools (except for MitmProxy, see below) were able to decode the protobuf data I wanted to know why…
2
votes
1 answer

Host ASP.NET Core grpc service on Linux with Nginx

I'm trying to host my asp.net core (.NET 6.0) grpc service on linux (ubuntu 20.04) with nginx. I Managed to make the hosting work with below steps first install nginx and setting up server block using this link (server block: vm2.arzval.com) on the…
2
votes
0 answers

Python test grpc client

I've written a Python GRPC client and would like to be able to test it using Pytest. What I would like to do is mock out GRPC server response to be the same response every time. What is the right way to do this?
datahack
  • 477
  • 1
  • 11
  • 32
2
votes
0 answers

how to apply a filter to one of the http_routes in a VirtualService

I'd like to expose a virtual service in a gateway in such a way that it will respond to both grpc and REST request at the same port/host. The discriminator between the two call mode is the Content-Type: application/json is for REST, everything else…