DEV Community

Cover image for Chrome for Developers: Thorsten Hans talks with Thomas Steiner
Jasmine Mae for Fermyon

Posted on

Chrome for Developers: Thorsten Hans talks with Thomas Steiner

In early January, our Senior Cloud Advocate, Thorsten Hans, joined Thomas Steiner in a WasmAssembly episode at Chrome for Developers! In this episode, Steiner and Hans both explore the world of WebAssembly serverless functions and microservices with the Spin framework.

Let’s dive a little deeper into their talk.

Firstly… what is a Cloud Advocate?

At Fermyon, our foundation is strong because of the community of developers we work and build with. We’ve always believed that our projects can only be strong and powerful because of all the contributors and maintainers that are part of these projects. Recently, we contributed the open source projects, Spin and SpinKube to the CNCF Sandbox.

As mentioned in the podcast, with a Senior Cloud Advocate like Thorsten, we are able to engage, learn, and build with the DevOps community to make our tools better. Because of the feedback we’ve received, we were able to improve Spin and release Spin 3.0.

Why does Spin matter?

One of the questions that Steiner asks is, “What is the difference between microservices versus a microservice application?”.

As Thorsten mentions in the video, microservices provide one service. Self-explanatory, and not a relatively new concept. But, with microservice applications, you would require more than one service. With the WebAssembly component model, you can design the microservices or architecture with a programming language of your choice. A Spin application can consist of multiple components and different languages, which helps to efficiently streamline your application.

But… how exactly does the component model work?

In Spin 3.0, we introduced component dependencies. This component model standardizes interfaces for components using WebAssembly Interface Types (WIT). Thorsten digs deeper into this, explaining how when you compile this component, you can use it as a library or a dependency with the flexibility of another program written in a different language! For documentation, visit here.

Spin triggers with the WASI HTTP API

After introducing the component model in the podcast talk, Steiner mentioned HTTP requests as a trigger and the WASI HTTP API. But, are there any others?

Yes! Along with those triggers that were mentioned, we have the command trigger. If you want to deploy your workloads to Kubernetes, Thorsten states that the command trigger acts as a “fire and forget trigger.” It will execute your code to completion and also terminates itself. This allows developers to run Jobs and CronJobs on Kubernetes using WebAssembly. More on WebAssembly Jobs can be found https://www.fermyon.com/blog/wasm-jobs-and-cronjobs-with-spinkube. We’ve seen that the Command trigger has been popular these days. There are triggers for SQS, Kinesis, a Cron trigger for cases where you don’t run on Kubernetes, etc.

StarlingMonkey

Last year in August, we announced a new JavaScript SDK that was a complete rewrite of our previous one, which improved ecosystem compatibility, standards compliance, robustness, and other key new features. After talking about the different triggers, Hans and Steiner talk about StarlingMonkey and the new SDK that we announced last year.

This new SDK is built on top of Firefox browser’s SpiderMonkey engine, and the Bytecode Alliance’s StarlingMonkey runtime and ComponentizeJS WIT bindings generator.

At the beginning, our team at Fermyon wanted to assist developers who were using different languages other than JavaScript and TypeScript. So, we used a project called Javy from the Bytecode Alliance, which allowed us to add new capabilities, leading to an implementation to support Fetch. But, we wanted to do more than that, so our team, especially Till Schneidereit, built StarlingMonkey on top of SpiderMonkey!

Your turn to take Spin for a spin!

As a team and community, we’re always looking to build and collaborate with other developers who are excited about WebAssembly. We had a great time with Thomas Steiner and Google’s Chrome for Developers podcast, and we’re looking forward to new contributions we’ll see with Spin and SpinKube.

🚀 Try Spin today: Follow the QuickStart guide to build your first serverless Wasm app!

💬 Join our community: Connect with us on Discord and explore cool Spin projects!

Top comments (0)