Closed shaunc closed 3 years ago
There are no plans, gRPC support for different languages/systems happens when someone implements it.. PRs welcome!
This issue has been automatically marked as stale because it has not had activity for 1 year. It will be automatically closed if no further activity occurs. To keep it open, simply post a new comment. Maintainers will re-open on new activity. Thank you for your contributions.
a new comment. edit: apologies i hope this is not overly rude. i wanted to keep this very interesting capability open for discussion.
This issue is stale because it has been open 6 months with no activity. Please comment or this will be closed in 14 days.
I've been actually thinking of implementing it for node JS.
@krojew I've been thinking of how do we add GRPC to FlatBuffers on nodeJS, and after a bit of experimentation I found out that we can do the following:
class Message {
constructor(data) {
this.data = data
}
getData() {
if (this.data) {
// we return a Buffer for the data that can be passed into Flatbuffers/grpc
return new Buffer.from(this.data)
}
throw new Error('Data cant be empty');
}
}
function serialize_Message(arg) {}
function deserialize_Message(buffer_arg) {}
var GreeterService = exports.GreeterService = {
// routes for greeting
sayHello: {
path: '/helloworld.Greeter/SayHello',
requestStream: false,
responseStream: false,
requestType: Message, // Uses only one class which would make the user responsible for managing their buffers
responseType: Message,
requestSerialize: serialize_Message,
requestDeserialize: deserialize_Message,
responseSerialize: serialize_Message,
responseDeserialize: deserialize_Message,
},
};
what do you think?
Unfortunately, I don't know grpc enough to have an opinion on this.
When I was actively interested I asked around:
Seemed that stakeholders were open to it but no one wanted to go first. Personally I have too many other tasks to take the lead, but perhaps could help support when I find time or if it comes to bug-fixes.
@shaunc I mean I've tested it around and it works, I just want to know what's the best practice since I usually work with swift and not JS. FYI, I will start by adding support to this grpc-node
But when I am ready to PR, I'll definitely tag you so you can take a look
This issue is stale because it has been open 6 months with no activity. Please comment or this will be closed in 14 days.
Did anyone ever get this working or build some support for it? The generated grpc code only works in node.js, not the web.
Are there any plans to support grpc-web, or knowledge of 3rd-party projects that do so?
We are designing a browser-based visualization tool, which we'd like to connect to Golang services which currently use flatbuffers (though they could be changed to use protobuf). In the browser we'd like to access the data directly in flatbuffers to minimize browser memory consumption.