Questions tagged [grpc-node]

grpc-node is a high-performance, open-source universal RPC framework for Node.js platform.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

grpc-node repository

gRPC Node Quick Start

222 questions
1
vote
0 answers

calling .net core 3.1 gRpc service from nodejs client

Using .net core 3.1 on windows 10. Created sample GrpcGreeter server and GrpcGreeterClient applications. From GrpcGreeterClient app, I can successfully call Greeter service. greet.proto syntax = "proto3"; option csharp_namespace =…
killjoy
  • 864
  • 17
  • 31
1
vote
0 answers

Is it possible to use gRPC with Fastify?

Looking around the docs, I don't see any support for gRPC with Fastify. Is there a way to use Fastify with gRPC as the transport protocol?
swannee
  • 3,346
  • 2
  • 24
  • 40
1
vote
0 answers

GRPC service working fine running locally, but failing to connect when run from a Docker container - How to debug?

I have a GRPC service that I've implemented with TypeScript, and I'm interactively testing with BloomRPC. I've set it up (both client and server) with insecure connections to get things up and running. When I run the service locally (on port 3333),…
heckj
  • 7,136
  • 3
  • 39
  • 50
1
vote
1 answer

Importing Proto File to another ProtoFile in NodeJS

I am quite new to Protocol Buffers. I noticed that the grpc proto-loader module requires just a single proto definition file to load, so I have loaded it in my code as below: const PROTO_PATH = `${path.resolve(__dirname,…
ololo
  • 1,326
  • 2
  • 14
  • 47
1
vote
1 answer

Avoiding Port Conflicts in GRPC Server

I am currently looking at GRPC for my real time needs. I noticed in the examples that we are explicitly required to bind to an hardcoded port in the Server. I hope to deploy the Server on a Stack like Heroku. Imagine I set the port to 9090 and that…
ololo
  • 1,326
  • 2
  • 14
  • 47
1
vote
0 answers

how do I make requests with node js grpc server vue js

I am having such a problem when sending a request to the grpc server with vuejs, how can I do? How can I create a nodejs grpc server and use vue js as a client to send a request and get a response. MyServer Code here; const grpc =…
1
vote
2 answers

How can i send/receive JSON files through gRPC communications? Node.js

Analyzing quick guides I was able to understand how to set up the protocol buffers to send/receive objects already known by client and server. My doubt is how to send or receive an entire JSON file, even when I dont know its properties and types.…
1
vote
0 answers

How can I read and write data from a specific port to the console?

I'm writing a listener service. Data is streaming to me from a specific port. But I cannot read the incoming data and write to consola. I have a listener service written in GoLang. I tried to extract the listener logic from these codes and adapt it…
1
vote
1 answer

gRPC Node microservice talking to another microservice in istio mesh

I've got several gRPC microservices deployed via Istio in my k8s pod behind a gateway that handles the routing for web clients. Things work great when I need to send an RPC from client (browser) to any of these services. I'm now at the point where…
codedread
  • 1,312
  • 11
  • 18
1
vote
0 answers

Can pm2 automatically restart a script that end?

I made a gRPC client in node and i start it through pm2 with a simple: pm2 start --name myAppName The gRPC client have some listener on.data, on.error on.end etc All works well but sometimes the gRPC server trigger the on.end with an error and then…
Christophe
  • 145
  • 1
  • 1
  • 12
1
vote
1 answer

How to implement gRPC Gateway in a node backend

I'm trying to implement gRPC gateway in a Node.JS server following the installation guide. The steps are writen for golang but I tried to do in Node.JS. I found this response, and also some packages like this one so is possible implement in…
J.F.
  • 13,927
  • 9
  • 27
  • 65
1
vote
1 answer

Retrieve nested list (matrix) from gRPC in NodeJS

I'm using gRPC with NodeJs and the response I want is this (example in JS format): [ ['aa1', 0, 0], ['aa2', 0, 0], ... ['aaN', 0, 0], ] Is a list inside another list. Like a 2-Dimensional array or a matrix. The problem here is I haven't…
J.F.
  • 13,927
  • 9
  • 27
  • 65
1
vote
1 answer

Why Bi-directional stream is block until CompleteAsync

I don't understand why the response comes only if I use CompleteAsync(). using var call = _apiClient.GetToken(headers: _threadContext.Metadata, deadline: DateTime.UtcNow.AddSeconds(5)); var keyReq = new GetTokenRequest() { Key =…
1
vote
0 answers

Is there a more convenient way to map the plain js object to grcp response class?

Here is the RESTful API response json: { "success": true, "data": { "loginname": "mrdulin", "avatar_url": "https://avatars1.githubusercontent.com/u/1147375?v=4&s=120", "githubUsername": "mrdulin", …
Lin Du
  • 88,126
  • 95
  • 281
  • 483
1
vote
0 answers

Is there a way to generate pb files based on the options same as loadSync method uses?

When using dynamic code generation, we can load .proto files using: const packageDefinition: PackageDefinition = protoLoader.loadSync(PROTO_PATH, { keepCase: true, longs: String, enums: String, defaults: true, oneofs: true, includeDirs:…
Lin Du
  • 88,126
  • 95
  • 281
  • 483