Intersection of WebAssembly and Serverless

Now that we’re all on the same page with the idea that serverless is just event-driven functions with their ceremonial robes of non-functional requirements delegated to a platform abstraction, let’s talk about what any of that has to do with WebAssembly.

After reading this book, hopefully your perspective on what WebAssembly is and how it can be harnessed has changed. A WebAssembly module is a portable encapsulation of some set of functionality. Where it begins to intersect with serverless is that on their own, WebAssembly modules are helpless. It cannot make HTTP requests from inside a module without an explicit contract with the host allowing it to do so, it can’t listen on endpoints unless the host lets it do it. By and large, WebAssembly modules are more limited than regular serverless functions—and that’s a good thing.

As you’ve seen in this book, if you write your WebAssembly code in a way that conforms to a well-known host interface (like the one provided by a compliant web browser), then your code is truly portable. It can run anywhere that contract is satisfied, whether that’s a Raspberry Pi, a Rust console application, a web browser, or a serverless platform like the ones I’ll discuss next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.108.212