Рет қаралды 616
Doing Server Side WebAssembly the Hard Way - Liam Crilly, NGINX
The linear byte-streams in and out of the WebAssembly sandbox are a neat fit for the synchronous request/response pattern of HTTP. So when the NGINX Unit team decided to implement a server-side module for WebAssembly, we thought it would be easy. Just hook up our HTTP server implementation to Wasmtime and let the bytes flow… But instead, what we found was a world of pain, performing direct memory access using low-level languages. The reality is that carrying HTTP metadata in and out of the Wasm runtime is hard. The promise of high-level language productivity and memory safety eluded us. Join this talk to hear how we eventually succeeded in connecting all the dots, and the things we learned about server-side WebAssembly along the way. Finally, we'll explore how the WASI HTTP project sets out to solve the same problems so that the scalability of HTTP can be allied to the performance and portability of WebAssembly.