3 ms·
> But, in WebAssembly you get a few more things. One is fast start. This is one of the key things I think is differentiating versus the container world. The id
by rektide 5y ago
> But, in WebAssembly you get a few more things. One is fast start.
This is one of the key things I think is differentiating versus the container world. The idea of per-request instantiation is possibly within reach. This is a possible return to a very old, very simple architectural pattern, of cgi-bin! Running a process per request. Which we left because creating processes was expensive. Our new architectures- discussed in this write up- revolve around long running applications, which are compelled upon us for performance reasons. But WebAssembly seems well suited to very fast instantiation of new contexts. It re-opens the possibility that we can have (return to) smaller more discrete chunks of work, safer little units of execution running. We could go back to a Apache HTTPD style prefork world, the very old[1]!
This is part of the gradient we've been walking down, it feels like. VMs -> containers -> lighter weight containers. Returning to finer grained processes.
For anyone interested in a deep dive into some of the super neat systems programming going into making WebAssembly starts/instantiation fast, there's a bunch of active work to reengineer module instantiation, using memfd [2][3]. Really fun to see this getting hashed out.
> * So one answer to the question as initially posed is that no, WebAssembly is not the next Kubernetes; that next thing is waiting to be built, though I know of a few organizations that have started already.*
And as others have recommended, worth noting Krustlet[4], which allows running WebAssembly instances via Kubernetes. This could definitely make sense for a lot of our workloads. I think a lot of people also expect though that the cloud infrastructure itself will get rewritten or recompiled into webassembly. Where-as today we tend to wire systems together over protocols, via http or grpc, we'll be able to more directly stitch together plugably modular systems, where a generic control process to govern, i dunno pick an example, load balancers say, has a bunch of specific webassembly modules plugged in with the specific actuators / configuration for your set up. There's a real potential to fulfill much of the idea of micro-kernels here, of decomposing big applications into looser assemblages of generic code, drivers, and configuration.
[1] https://httpd.apache.org/docs/2.4/misc/perf-tuning.html#compiletime https://httpd.apache.org/docs/2.4/misc/perf-tuning.html#comp...
[1] https://github.com/bytecodealliance/wasmtime/pull/3697 https://github.com/bytecodealliance/wasmtime/pull/3697
[2] https://github.com/bytecodealliance/wasmtime/pull/3691 https://github.com/bytecodealliance/wasmtime/pull/3691
[3] https://krustlet.dev/ https://krustlet.dev/