[WIP]: Runtime to runtime communication#62
Conversation
…ns, and put comments on some code to make it easier to read.
…ersion to ES6 module execution.
…, and made referer optional for module resolution.
… added json resolver pathing into the hello-world.
…tualy service runtimes.
|
Oh dear It seems that I forgot to merge fly.rs back into my fork after the last commit. |
|
I did a manual merge back into my branch not exactly ideal, but it compiles and runs again. Despite being a slight setback I'm really glad for some of the refactors. Some of those files where getting a little long. @michaeldwan and @jeromegn I think that now is a good time to open a dialog about the performance concerns with these changes. My main concern here is that I'm using
The important thing here is reducing event dispatching latency(and throughput as result) even if it increases the time it takes to complete other tasks. I would really love to eliminate the need for a lock at all, but I don't really see a good way to do this. I'm still pretty new to managing memory and multi-threaded code in general, so there may be a simple solution I'm missing here. A benchmark for these metrics would also be very helpful. |
|
I went back and switch out those |
|
This PR is a bit hard to review. I assume it's not ready for review since it's still marked as WIP. It needs a bit of a cleanup, our commits seem intertwined with yours and there is still a lot of conflicts. Could you include an example of how it works in TypeScript? There might be one in the code already, but I have a hard time finding it through the many changes. I assume this is a bit like the Web Worker API. I'm interested in how they're spun up and how they send each other messages. |
|
I don't think that it's ready to merge yet for sure, but I think that some of the refactored systems like
I already have a example I've been using to test my changes. The example,
The current system doesn't really look much like the web worker one. The current system is designed to be setup and controlled by implementation code. It's designed for running somewhat trusted js/ts/wasm code as a internal service. With things like compilers, language services, production/staging debugging tools, or other js/ts/wasm native software it would not only be very heavy to load the code(typescript compiler alone is >20mb) for each app's runtime, but it would also be potentially be insecure to give the required permissions(like file system read/write) to said runtimes. I also already have a specific piece of infrastructure that would benefit from this system in production(other than debugging/integration tools). |
My next logical step towards #38. This is very unfinished currently, but it currently at a state where it compiles and runs. I figure it might actually be useful to take a look at this point.
Most of the functionality isn't complete yet, but a lot of the ground work exists.