Why Docker and WASM?
Starthub exists just above the OS layer and below the process layer. Therefore, Starthub does not really care about what execution units are being used, as long as their inputs and outputs are expressed as JSON arrays.
In other words, Docker and WASM are just carriers of computation, and each of them is suitable for different use cases.
When to use which?
-
WebAssembly is great for short-running operations that need fast startup time, perform simple operations (eg an HTTP call) and do not need a full-fledged enviroment.
-
Docker is great for long-running operations where a full environment setup is needed. For example, UI interactions (either manual or via Playwright) can only be achieved within a full evironment, since a browser is needed. However, Docker images are heavy (5-10MB minimum) so Docker should only be used when as the ultimate escape hatch.