aurae icon indicating copy to clipboard operation
aurae copied to clipboard

Support for gRPC streaming in Auraescript

Open JeroenSoeters opened this issue 3 years ago • 3 comments

Right now, we don't support streaming in the TypeScript API, it would be nice if we would.

https://github.com/aurae-runtime/aurae/blob/main/auraescript/macros/src/ops.rs#L60

JeroenSoeters avatar Feb 04 '23 05:02 JeroenSoeters

Will probably need this: https://docs.rs/deno_core/0.170.0/deno_core/trait.Resource.html#

future-highway avatar Feb 04 '23 16:02 future-highway

This may go against the goals of the project, and I may be missing a key advantage to having Rust be the glue for the gRPC interactions, but it may be worth looking at using a Deno compatible gRPC library for JavaScript, and then wrapping those in the predefined API functions.

It may also be useful for a developer who wants to utilize the "vanilla" gRPC interaction functions in JavaScript (maybe to access unstable features? or just want to for 🤷🏻‍♂️ ).

I've been using this library to write gRPC clients in Deno apps: https://github.com/bufbuild/protobuf-es

EDIT:

ES Protobuf doesn't generate service definitions at this time, so may not be the best choice.

seanwatters avatar Feb 26 '23 22:02 seanwatters

the choice to use gRPC was certainly so that users could bring their own client, but i'd like to focus this issue on the core problem that the current gRPC generation doesn't support streaming.

this would be very helpful for the logging endpoints in particular.

dmah42 avatar Jun 21 '24 14:06 dmah42