aurae-runtime / aurae

Distributed systems runtime daemon written in Rust.
https://aurae.io
Apache License 2.0
1.84k stars 91 forks source link

Support for gRPC streaming in Auraescript #351

Open JeroenSoeters opened 1 year ago

JeroenSoeters commented 1 year ago

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

future-highway commented 1 year ago

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

seanwatters commented 1 year ago

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.

dmah42 commented 1 month ago

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.