Questions tagged [grpc]

1

votes
3

answer
99

Views

null value issue in models in grpc-go

I have two servers User Server: handle all the user CRUD operation Product Server: Handle Product CRUD operation and fetch user info from the user server via gRPC call type User struct { ID string `json:'id'` FirstName string `json:'firstName'` MiddleName *string `json:'middleName,om...
Ridham Tarpara
1

votes
1

answer
109

Views

How is gRPC client streaming implemented

How is gRPC client streaming/bidirectional streaming implemented with HTTP/2? Server streaming makes sense, in that it could utilize server push to send multiple responses to a request, but it's not clear to me how it does bidirectional message passing over HTTP/2 the way one would over a websocket.
kag0
2

votes
0

answer
29

Views

How to force gRPC cpp program using single thread only

I need to run my client application (written in c++ with gRPC) in an operating system (which only support single thread). However, I noticed that grpc::InsecureChannelCredentials(); is trying to create multiple threads. Here is the output from debugger after calling that gRPC function in my host mac...
J.Z
1

votes
2

answer
246

Views

Bigtable (from Go) returns “server closed the stream without sending trailers”

We are using Google Cloud Bigtable, accessing it from GCE instances using the Go library to access it. For some ReadRow queries we get the following error: rpc error: code = 13 desc = 'server closed the stream without sending trailers' It is noteworthy that these are consistent. In other words if...
Ian Rose
1

votes
1

answer
639

Views

Access grpc stream variable for long-running process in Node

I am using Node.js to connect to a server using gRPC that performs a long running task. The server sends a unidirectional stream to the client (the Node.js app) while the job is in progress. I need to implement a Stop button and am told that closing the gRPC stream will stop the job in progress. Thi...
rink.attendant.6
1

votes
1

answer
869

Views

Accessing Google Cloud Pubsub over HTTP 2 using grpc and protobuf (generated client)

I am attempting to use the google cloud pubsub service by using the service definitions at https://github.com/google/googleapis/blob/master/google/pubsub/v1/pubsub.proto I am able to generate the client code and have the following code to get a topic: ManagedChannelImpl channelImpl = NettyChannelBui...
Ankur Chauhan
1

votes
1

answer
526

Views

Hundreds of streams are allocated on the server when using gRPC in Android requests

I use gRPC from Google for work with server, but after some time I notices that streams are allocated on server and only when I close my app they closes. GatewayGrpc.GatewayBlockingStub stub = getGatewayBlockingStub(); Gw.GetRequest request = new Gw.GetRequest(); request.authToken = authToken; requ...
Ihor Kostenko
1

votes
1

answer
822

Views

Compiling GRPC 0.15 with MSVC 2015 for usage with Qt 5.6 on Windows

The process is extremely non obvious and error prone so I think a place where a proper procedure is described is required. I will answer my own question below, but it is more or less a hack and slash solution as Visual Studio is mostly Terra Incognita for me and I just stumbled on a combination that...
Zeks
1

votes
1

answer
551

Views

Strategy for keeping gRPC definitions and generated files in VCS

I wanted to use gRPC in a system composed of multiple services (each in its own repository) and I was wondering about approach towards versioning in Git: *.proto files generated code (mostly Go/Java/Python) So far I was thinking about approach like: *.proto files - either: each definition goes to se...
kkonrad
1

votes
0

answer
8

Views

Cannot run gRPC protoc in alpine based dotnet SDK

See this github issue: https://github.com/grpc/grpc/issues/18338 See this example repo: https://github.com/slolife/alpine-protoc If I include the Grpc.Tools 1.19.0 nuget package in a project, which adds a build step This works fine if I create a docker image to build and use the microsoft/dotnet:2....
slolife
1

votes
1

answer
283

Views

Java + GRPC, for dummies?

I have managed to clone the grpc-java from github and ran the gradlew script. Helloworld seems to be working and so on. However now I'm pretty much stuck. How can I continue developing on Eclipse? Is there somewhere a .jar file I need to add to my project? How does this work?
Kamsiinov
1

votes
3

answer
96

Views

How to import a variable from an init function (inside main.go) to a different file in go?

Here is my directory structure: my_project my_api main.go util_dir util.go I am passing some environment variables in the init function inside the main.go since I want them to be sourced whenever my service starts. Below is the main.go code snippet: import ( 'net/url' 'net' ) func init() { .....
Sanket
1

votes
1

answer
615

Views

NodeJS gRPC: “Method handler expected but not provided”

I plowed through the docs and haven't found a solution yet. The app is loosely based on the 'sayHello'-example from their docs but every time the code runs the warning Method handler for /eventComm.DatabaseRPC/InsertSingleDocument expected but not provided is returned. My proto file: service Databas...
trahloff
1

votes
1

answer
216

Views

Bond Communications Framework Deprecated

I´ve used the bond-compiler gbc to create some object and a service definition for me: namespace Something; struct SomeStruct { 0: string SomeName; } struct SomeResponse { 0: string ResponseString; } service SomeService { SomeResponse DoSomething(SomeStruct); } The compiler generated a class defini...
Joshit
1

votes
1

answer
61

Views

How does the protobuff compiler distinguish between different services and their messages with same identifiers/tags?

the question is regarding the deserialization process. I thought the first bytes describe the tag and the corresponding on-wiretyp. But what if two services using in their messages the same tag/identifier and datatype? Thanks in advice Theo
Theodor
1

votes
1

answer
575

Views

Tensorflow serving grpc client error 12

I am currently trying to serve a simple model via tensorflow serving and then I want to call into it via gRRC using node.js. I felt the easiest way to learn/understand this would be to break it down to the simplest model possible. Please forgive the naming as I originally started doing this with a...
xtr33me
1

votes
1

answer
968

Views

Node js client for grpc server

I have GRPC server running using openssl - static way and I am trying to connect to server using nodejs client I do not see any error but I do not see its connecting to server either. Please share if you have any sample. Please refer code below: var rootCertPath = path.join('.','.', 'server-root.PEM...
Nitin Lodhe
1

votes
1

answer
343

Views

Unable to load a model in pyspark and serve using grpc

I am trying to serve a spark wine classification model using grpc. I have already trained the model. And I have already written the code to serve in on an http server using flask. Now, I am trying to serve it using grpc to try and understand performance gains. But I am getting the following erro...
yashdosi
1

votes
2

answer
737

Views

Setting gRPC Java

Good day to you Java and gRPC gurus out there. I have been following this https://github.com/jpdna/gRPC-maven-helloworld, because I am learning gRPC using Java. I was able to compile it using mvn clean package. But when I loaded the project in Eclipse, the file: org.jpdna.grpchello.HelloWorldServer...
Artanis Zeratul
1

votes
1

answer
690

Views

Retrofit and GRPC

Been tackling this for two days. I'm trying to use the ProtoConverterFactory with gRPC but not having any luck with it. public class RetrofitService { public void makeRequest() { Retrofit retrofit = new Retrofit.Builder() .baseUrl('https://myurl:444') .addConverterFactory(ProtoConverterFactory.creat...
Sean Keane
1

votes
1

answer
284

Views

Manually test grpc interfaces

When you have soap webservice, you can always use soapui to create test xml requests for manual interface tests. You insert you test data into the xml document and send the request to the soap provider. You can then analyse the response in soapui. We are currently thinking about switching from soap...
nemoo
1

votes
1

answer
168

Views

Should I create a message per method or use a shared message in gRPC?

Currently I'm using gRPC as the communication between my servers, but I don't know which is the best pattern. Should I create a shared request message (UserRequest is treated like an User object): service User { rpc Create (UserRequest) returns (Reply) {} rpc Update (UserRequest) returns (Reply) {}...
Yami Odymel
1

votes
1

answer
284

Views

gRPC support for .NET 3.5 framework

According to official grpc documentation, the grpc for C# requires at least .NET 4.5 framework. I have a project that should be supported on Windows XP which is running .NET 3.5. Is there any porting of grpc that can run on .NET 3.5?
Pupsik
1

votes
1

answer
451

Views

How to set timeout of grpc client in node.js

I'm referring to the following example of node-grpc client: https://github.com/grpc/grpc/blob/master/examples/node/dynamic_codegen/greeter_client.js //create a client var client = new hello_proto.Greeter('localhost:50051', grpc.credentials.createInsecure()); //issue the call client.sayHello({name: u...
user3151330
1

votes
1

answer
241

Views

node js grpc server forceShutdown doesn't shut down properly

I'm trying to restart a grpc node js server after shutting it down The first time the grpc server starts it is ok, but trying to start after forceShutdown gives the error: Error: Server is already running This is the code: server.start(); // runs ok server.forceShutdown(); server.start(); // gives...
Stanley
0

votes
1

answer
11

Views

Is a corrupted file an Invalid Argument?

I'm programming a service with a team. The service receives a file as a byte array and returns a response. We are expecting a specific type of file (PDF, WORD, EXCEL, TXT, etc) We are discussing what type of exception throws if the file is corrupted or invalid (a 0 bytes PDF file for example). We ar...
Jose Truyol
1

votes
1

answer
626

Views

Please clarify gRPC cancel semantics

Am I right in assuming the following semantics for cancelling a call (unary or streaming) from the client side will result in: the client will just cancel the request on the transport level the client will not wait for any ACK from the server to confirm cancellation (non-blocking cancel) hence, it c...
user3612643
1

votes
1

answer
487

Views

Servable not found for request: while loading an older version of the model

I've a model, let's say mymodel and two different data sets: setA, setB. After training(in my local machine) setA and setB separately, tensorflow serving created two different directories: 100, 200 for setA and setB respectively. To host the model inside docker [email protected]:/# ls /serving/model...
Abhisek
1

votes
2

answer
212

Views

What library am I missing if Google.Api.AnnotationsReflection is missing from my gRPC project?

I built some protocal buffers using Protoc tools version 1.7.2 using the project I created from followed the tutorial here: https://grpc.io/docs/quickstart/csharp.html#update-and-run-the-application The code generated from the .proto file spat out this line: new pbr::FileDescriptor[] { global::Googl...
Fog
1

votes
1

answer
310

Views

grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.RESOURCE_EXHAUSTED, details="Received message larger than max

I built a segmentation model in keras and wanted to run the model in tensorflow serving. Currently I am able to export the model and run the model server, but the output is too big when I ran the client.py file. The error is: File '/home/.../serving/bazel-bin/tensorflow_serving/car_mask/mask_client....
M.Cong
1

votes
1

answer
114

Views

Split up servicer gRPC python

Building my first gRPC server application. I don't know if this is a common problem, but my rpc servicer is getting quite large. With servicer I mean the class that inherit from the generated xxx_pb2_grpc.xxxServicer (in python at least). At the moment it has 19 RPC calls. So my class which implemen...
MDijkstra
1

votes
1

answer
1k

Views

What gRPC monitoring and metrics for grpc-java should we be using?

We use many grpc channels in a production environment. Some of the channels are opened then shutdown, and many are left open persistently. Recently after a development project, we realized we were leaving some channels open instead of shutting them down, and we didn't realize it until it became a r...
Nicholas DiPiazza
1

votes
1

answer
234

Views

How can I return an error from a gRPC service?

I have a simple gRPC service running in Ruby. Under some conditions, I want to return an error to the client in a controlled fashion, something like an HTTP status code with an error message. I don't see any clear way to do this from the documentation; what is the correct way to do so?
1ijk
1

votes
2

answer
1.3k

Views

How can a gRPC server make calls to REST endpoints

I'm currently new to gRPC technology and have been reading up on it. My current understanding is that gRPC is just another protocol just like how REST is one. Now lets say I spin up a gRPC server that I want clients to consume, but in that gRPC server I'd like to be able to get information from outs...
efxgamer
1

votes
1

answer
385

Views

Bidirectional gRPC stream sometimes stops processing responses after stopping and starting

In short We have a mobile app that streams fairly high volumes of data to and from a server through various bidirectional streams. The streams need to be closed on occasion (for example when the app is backgrounded). They are then reopened as needed. Sometimes when this happens, something goes wrong...
Phlippie Bosman
1

votes
2

answer
2.2k

Views

Go gRPC simple service Asynchronous and Synchronous explanation

I am trying to understand GoLang 'Go' together with gRPC and to make a simple service scalable. Lets say I have a client1 that calls a service1(adds numbers) that calls service2(determines if the result is prime), and service2 returns the result to service1 that returns the result to client1 all via...
Wayne
1

votes
1

answer
466

Views

Is there a way to configure the generate method name for grpc-node client?

I am hoping to use a grpc-node client to talk to a microservice built in Go using the go-micro framework. I am running into an issue where go-micro defines method names using periods (.) to separate namespaces and method names, whereas grpc-node slashes (/). Is there anyway to configure this pattern...
ThePurpleMonk
1

votes
1

answer
513

Views

Trying to understand the use of channel in gRPC client in golang

Could someone please help me understand the usage of the channel in the client side of gRPC code here (for bidirectional streaming RPC): https://grpc.io/docs/tutorials/basic/go.html This is the code: stream, err := client.RouteChat(context.Background()) waitc := make(chan struct{}) go func() { for {...
SimpleCoder
2

votes
0

answer
17

Views

How to set a value for a protobuf map<string, string> property in C#

I have the following protoc3 message: message LocalizedString { map translations = 1 } When compiled into C#, I get the following autogenerated code: using pb = global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = globa...
PassKit
1

votes
1

answer
337

Views

grpc : call was half-closed error

I'm using Google Cloud Platform Speech API. I'm developing using sample source. https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech almost the same as sample source. except many start/stop of VoiceRecorder in my app. I got this error in samsung devices. I didn't get...
Aung Thu Win

View additional questions