You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To achieve this, we must spawn tokio tasks for WASM function executions instead of spawning OS threads as we do now. We must also investigate whether we have other blocking code (looking at you, module compilation 👀 ) which must be migrated to work async to not block the event loop.
Generally, a high-level goal of this task is to be able to handle ~10k concurrent calls into WASM. A side-goal is to enable preemtive WASM scheduling (e.g. by utilizing epoch based interruptions) - we might want to implement preemtive scheduling in a follow-up issue, though, if it turns out to be too much for one change.
While discussing #391 we found it's a good idea to switch Wasmex to an async Rust runtime, probably https://tokio.rs/.
An async runtime allows us to enable async wasmtime features, like
Trap
ingTo achieve this, we must spawn tokio tasks for WASM function executions instead of spawning OS threads as we do now. We must also investigate whether we have other blocking code (looking at you, module compilation 👀 ) which must be migrated to work async to not block the event loop.
Generally, a high-level goal of this task is to be able to handle ~10k concurrent calls into WASM. A side-goal is to enable preemtive WASM scheduling (e.g. by utilizing epoch based interruptions) - we might want to implement preemtive scheduling in a follow-up issue, though, if it turns out to be too much for one change.
We might "borrow" some ideas from https://github.com/scrogson/franz (thanks @scrogson 🌻 ) and ideas from this rustler issue on how to implement async NIFs
The text was updated successfully, but these errors were encountered: