
It was first called Spin in 2022, inspired by Microsoft project Stargazer (now called wagi). That was also about three years before the news this week about the CNCF’s acceptance of Spin and SpinKube, two of WebAssembly’s leading open source tools, as sandbox projects.
The project’s “guiding story” from the outset of Spin’s creation remains true today: “As a developer, I could go from blinking cursor to deployed application in two minutes or less,” said Matt Butcher, CEO and co-founder of Fermyon, a former Microsoft engineer that is behind the project. “We wanted it to be very easy for a developer to get that endorphin rush of success.”
Flash forward a couple of years later to March 2024. Butcher thought that Spin, a developer tool, might not be welcome in CNCF. He suggested trying instead the Apache Software Foundation or Bytecode Alliance. It made more sense to donate only SpinKube, which is designed for WebAssembly on Kubernetes, to the CNCF.
“It made sense for the Kubernetes-oriented WebAssembly runtime to be part of the CNCF,” Butcher said. “We might have been able to push SpinKube through the sandbox process quickly. But our collaborators over at Microsoft suggested a bolder move: We should move all of the Spin ecosystem into CNCF.”
Under One Foundation
Many involved and interested in the project shared the opinion that having the whole toolset under one foundation – and in particular, under the foundation that has such a profoundly positive impact on the cloud ecosystem – “just made sense,” Butcher said. “That move definitely slowed the acceptance process. We rewrote proposals and expanded the scope of our review.”
Donating the project to the CNCF was “undeniably the right call,” Butcher said. “I very much appreciate the Microsoft Azure folks not just suggesting the idea, but also helping us through the process. (Micrsoft’s] David Justice and Ralph Squillace have been absolute champions for Spin and SpinKube,” Butcher said. “Start to finish, it took us about 10 months. But given how much we expanded the scope, I am pleased with the result.”
The CNCF’s acceptance of Spin and SpinKube, one of WebAssembly’s leading open source tools, should add further momentum to the projects and to WebAssembly as a whole. It’s also beneficial for cloud native development. Beyond the increased support and pull requests from the CNCF, Spin and SpinKube are expected to evolve alongside some very promising aspects of WebAssembly.
Spin and SpinKube
Spin 3.0 enables developers and platform engineers to easily get started with deploying and managing applications using WebAssembly modules. A key feature is its use of the newly completed WebAssembly interface types (WITs), which allows components to interoperate regardless of the programming language used to create them. This interoperability underscores the compatibility and modularity of WebAssembly, akin to microservices.
Significant progress has also been made in supporting the WASI API standard, including the WASI Key-Value and WASI Config APIs, both now supported by Spin. This effort is part of a broader open source collaboration to bring WASI Cloud to fruition. WASI Cloud is a proposal to standardize APIs that enable applications to interact with a unified set of cloud services through Spin.
Again, Kubernetes, and more specifically, serverless on Kubernetes is where SpinKube comes into play. As Knative, OpenWhisk, Fn Project and other Kubernetes serverless frameworks struggle to perform efficiently, there has been a “gaping hole for what Butcher describes as a new generation of serverless inside of Kubernetes.”
Publicly announced at KubeCon Paris and on track to become a CNCF Sandbox project, “SpinKube provides all the plumbing to add Wasm support to containerd and then supports Wasm applications side-by-side with containers inside Kubernetes,” Butcher wrote in a blog post. Containerd is so well designed that a Wasm binary can be scheduled into the same Kubernetes pod as a container, and the two can run side-by-side. This means a new kind of ultra-high-performing serverless for Kubernetes can augment existing container apps, Butcher wrote.
“Those who want to go all-in on serverless, porting their Lambda and Azure Functions code to Kubernetes, can do so quickly and easily with SpinKube,” Butcher wrote. “On the other hand, those who want to begin reducing waste inside their cluster can replace sidecars or low-traffic microservices with Wasm functions … and then gradually migrate what makes sense to them.”
Real-World Adoption
More importantly, beyond CNCF’s support and the contributions from its collaborators, the focus now shifts to how Spin’s and SpinKube’s evolution will affect real-world adoption, now that it is under the CNCF fold.
“When Docker first emerged on the scene, I (as a developer) fell in love with the tech, but it was years before I was deploying Docker containers into production. The key ingredient to Docker’s success was finding a way to run containers in production,” Butcher said. “Kubernetes provided that since, in many ways, Spin has followed a similar trajectory: Spin is a developer tool, and at 260,000 downloads, we are pretty confident that developers are finding it useful.”
But just like Docker containers, it has been necessary to design WebAssembly for production. “SpinKube provides that, and does so by thoroughly integrating with Kuberentes,” Butcher said. “Now it’s time to get all these Spin apps into production.”
CNCF’s involvement will hopefully accelerate the adoption of not just Spin and SpinKube, but WebAssembly as a whole. By joining a few other WebAssembly-focused CNCF projects, “it is clearer than ever that the early movers in the cloud native ecosystem see the promise of WebAssembly,” Butcher said. “And the more developers we can get engaged, the faster the technology will grow.”
The CNCF’s role in Spin’s and SpinKube’s development could influence cloud native infrastructure beyond WebAssembly. “Kubernetes has excelled at managing long-running servers in containers. But what drew us to WebAssembly wasn’t so much the standard or the tooling as WebAssembly is the perfect cloud runtime for serverless-style functions,” Butcher said.
“Proprietary solutions like AWS Lambda and Cloudflare Workers demonstrated how powerful serverless functions can be, but we needed to see the performance and scalability benefits of serverless land inside of Kubernetes,” he added. “Augmenting long-running containerized servers with instantly executing event-based functions opens up a wealth of possibilities for the future of the cloud native ecosystem as a whole. With SpinKube a part of the same community as Kubernetes, we can effectively co-evolve these technologies.”
The post Wasm Spin and SpinKube’s Rocky Road to CNCF Sandbox Status appeared first on The New Stack.
Tools that emerged as a Microsoft project in 2022 have evolved into a key piece of WebAssembly's cloud native future.