aurae-runtime / aurae

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

Auraescript create one client and give it to services #427

Closed izissise closed 1 year ago

izissise commented 1 year ago

TODO:

Maybe we only need one client instance and give it to each service instance?

let client = AuraeClient({
   ...
});
let cells = new runtime.CellServiceClient(client);

...
izissise commented 1 year ago

V2 with one client for all services, it wasn't easy to figure out how deno's resource_table work. In the end, deno macro does a magic thing were OpState is already filled when calling from typescript

future-highway commented 1 year ago

I'm not a fan of the changes in the "Make helpers included in global scope" commit.

While it is nice to not have to write import * as helpers from "../auraescript/gen/helpers.ts"; at the top of every script, we've lost the help of the IDE and typescript's type system.

I do think dma's suggestion of renaming helpers is a good idea though as the file is now providing more than just helpers/utility functions.

izissise commented 1 year ago

It should be good for a new review

izissise commented 1 year ago

I'll install typescript LSP that should ease the process

izissise commented 1 year ago

Rebased