One process, many stores? #122
Replies: 1 comment
-
In-process "transport" is certainly a possibility. In terms of overhead it's hard to say without looking at the implementation - in theory the runtime could optimize calls between components and pass raw canonical ABI value bytes around directly, which would eliminate the need for any encoding/decoding. If we really wanted the best way to call components in-process, we'd probably want to pass "pointers" around directly instead of dealing with bytes, that would have to be built in Wasmtime itself and is probably out of scope for this project. |
Beta Was this translation helpful? Give feedback.
-
Hello! 👋
Do you imagine wRPC as (eventually) being the best way to make calls between component instances from different Wasmtime stores within the same process? Or would you imagine something built deeper into Wasmtime could be meaningfully more efficient?
For my own uses I currently have a generic thunk thingy that maps values between the types in different stores and dynamically defines functions on linkers to facilitate cross-store calls (it's trivial — doesn't handle resources at all because I don't need that), but I imagine there's a lot of information that Wasmtime has internally that it could use to skip a bunch of that work, e.g. prove type equality once, and just copy bytes forever after.
Asking here because it looks like you've recently been deep within the bowels of Wasmtime!
Not asking for concrete answers here — just seeking general thoughts on the idea of overheads of different approaches and where wRPC sits in the solution space. 🙂
Beta Was this translation helpful? Give feedback.
All reactions