-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an example microservice using WebAssembly #38
Comments
There are multiple ways to deploy Wasm applications in cloud environments. deploy to JS environemntOne approach is the one mentioned in this blog post, (mentioned by @tgodzik) where only the business logic of the application is converted to Wasm, while communication with external systems is handled by JavaScript. With this method, it is possible to achieve deployment using the current Scala.js Wasm backend. However, the I don't see advantages over deploying Scala.js applications compiled to JavaScript (instead of Wasm). Perhaps the Wasm part might be slightly faster or the binary size slightly smaller, but the differences would be negligible. Server side WasmAnother approach involves converting applications into stand-alone Wasm (also known as "server-side Wasm") binaries and deploying them. Stand-alone Wasm binaries are independent of JavaScript and interact with the system (e.g., HTTP communication or file access) through the WASI. In this case, we can deploy these binaries
Currently, AFAIK, cloud providers such as GCP, AWS, and Azure do not offer FaaS specifically designed for server-side Wasm. As a result, deployment on them requires using Kubernetes. One significant advantage of this approach is that it avoids the cold start delays caused by hypervisor-based OS startup, which is typical in environments like Lambda [1]. [1]: Comparative Performance Study of Lightweight Virtualization Used in Serverless Computing On the other hand, the challenge lies in the fact that our current implementation of server-side Wasm for Scala.js relies on WASI preview 2 (Component Model). Unfortunately, the implementation status of this proposal in VM runtimes is still incomplete, and there is no VM at present capable of running our applications properly.
It comes down to two possible approaches we can take:
|
The text was updated successfully, but these errors were encountered: