-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use gRPC client like ngx.fetch without subrequest #671
Comments
local gcli = require("resty.grpc")
assert(gcli.load("t/testdata/rpc.proto")) It looks like it will parse a proto file on every request. |
i'm not suggesting the exact thing, this is just a reference to the JS tutorial guide from gRPC project |
I've been trying to do some experiences with pbjs and njs as well, but IMHO the way to get it working is too complex (a lot of steps prone to errors, browserfy the js, etc). Also I wasn't able (my fault 99% sure) to make something useful like a simple grpc client, generating the frame and calling via subrequest a gRPC upstream so having something simpler on njs would be amazing. I think generating the full js with pbjs is fine, but having something that we can do as simple as possible gRPC calls (or even generating njs compatible js, preloading it and calling the upstream) amazing! Thanks for the hard work on it, njs is amazing |
It would be beneficial to create a gRPC client in NJS similar
ngx.fetch
in the context of using itjs_content
orjs_periodic
to communicate with the external world.A reference to LUA experimental capabilities: https://github.com/api7/grpc-client-nginx-module/blob/main/README.md
Here is an example of a
node
code using a gRPC client:https://github.com/grpc/grpc-node/blob/%40grpc/grpc-js%401.9.0/examples/helloworld/dynamic_codegen/greeter_client.js
The text was updated successfully, but these errors were encountered: