6 ms·
Michael Irwin from Docker here (and author of the blog post too). Happy to answer your questions, hear feedback, and more!
by mikesir87 4y ago
Michael Irwin from Docker here (and author of the blog post too). Happy to answer your questions, hear feedback, and more!
- petilon 4y agoWhat problem is this solving?
- mikesir87 4y agoDepends on which "this" you're referring to. We (Docker) are trying to make it easier for developers to use the tools and capabilities they know and love to build, share, and run Wasm applications. As far as Wasm itself, it's designed to provide a fast, lightweight, secure, and portable binary format. While it was originally designed to help bring native code to the browser, it's quickly spreading to the server side. Many folks are using it for edge/IoT, but it's growing into other areas (saw demos today of even using it in databases as psuedo stored procedures). Happy to dive in more if you have more questions!
- deleted 4y ago[deleted]
- petilon 4y agoI didn't get anything from that. My question was not about WASM but Docker+WASM project. Why problem does it solve?
- synergy20 4y agothe only thing I see is that after wrapping wasm inside a docker you can leverage all those docker tools(k8n,etc)? the docker solves portability and scalability issues with a reasonable overhead, so wasm hides inside docker can benefit from some?
- saidinesh5 4y agoEasy orchestration and deployment is the only thing I can think of. Because of docker's infrastructure. But tbh if orchestration is really the concern, Docker + wasm seems less efficient than having a dedicated app that can orchestrate multiple wasm modules within the same process. But maybe that's something docker can solve later as the actual requirements emerge.
- mikesir87 4y agoSorry for the delayed response, but the problem we're trying to help solve is how to help lower the barrier of entry to using Wasm apps leveraging the tool many developers are already using. As an example example, with Docker+Wasm you can use a Dockerfile to build the app in a container image, distribute the Wasm bundle as an OCI artifact, and test it locally using the Wasm runtime. While the ability to build using containers has existed all along, the ability to actually run the Wasm app locally side-by-side your other containers (and leverage the same container network) is new. Hope that helps!
- politelemon 4y agoThat does help thanks. It's still all a bit abstract to me because I (like many others) are still not familiar with WASM itself so this next step is probably going to go unappreciated for a while. I'm a bit surprised by several comments in this post talking about how WASM could replace containers but I don't have the context around it
- pmontra 4y agoThis should be the copy of the announcement. Finally it's clear what it does. The announcement doesn't explain at all what docker + WASM is. Summary of summary: Dockerfile -> docker build -> docker container with the WASM app and runtime inside -> docker push/pull -> docker run container. However, even if I never compiled anything to WASM I think that it was already possible to build an image with a WASM container and runtime inside (as for any other language/runtime.) So what's the friction this is removing from the process?
- deleted 4y ago[deleted]
- Twirrim 4y agoI'm honestly really confused about the specific role docker is playing here. What, exactly, is Docker doing? Is it compiling the application? Is it making a runtime for the wasm binary? Is it being the runtime for the wasm binary, so the end user builds through whatever usual build processes and gets a binary they can then easily run? If the wasm binary is lightweight and portable, why is docker useful? edit: Given the other comments about "what problem does this solve" I think maybe the blog post has missed its mark slightly
- VWWHFSfQ 4y agoYeah. Not trying to be cynical, but this feels like someone at Docker said "we need to have a WASM story" and this is what they came up with. I really don't see the point.
- steve_adams_86 4y agoI’m curious about this too. I wonder if it could make testing frontend code that uses WASM (but not DOM) fast and easy since you wouldn’t need to fire up a complete browser environment. I’m not sure that it’s possible at the moment. In the past when I needed to test a WASM integration, I ended up using that approach and it was kind of a pain not to get immediate feedback on the WASM code’s API tests since it was essentially only testable through the complete integration environment. I like integration tests, but I like smaller and faster test suites for easing development in some conditions as well. You can currently test a WASM-targeted API if you use unit tests or other language-level testing approaches, but you won’t get the constraints of the WASM runtime as far as I know. Maybe the lack of garbage collection could be a critical constraint to test against. I suppose you could even test dynamically linked binaries without a browser as well. I’m sure there’s far more to it that I’m not aware of, and maybe testing really isn’t that useful of a feature here — I’m just guessing based on my own experience.
- quickthrower2 4y agoI am thinking isomorphic (share libraries between frontend and backend) but in a language of your choice instead of JS.
- Raed667 4y agomaybe a naive question: is there a way to run some form of docker in the browser? It could be a great education / demo tool
- mikesir87 4y agoGreat question! There isn't a way to run Docker directly in the browser. But, there are tools (like Play with Docker at play-with-docker.com) that lets you interact with a CLI in the browser to run commands against a remote cloud instance. I personally use this a lot for demos and workshops! But... certainly a neat idea to think about what Wasm-based applications could possibly look like/run in the browser!
- pistoriusp 4y agoHey! Peter from Snaplet here. This is really exciting stuff. We created the OSS postgres-wasm (https://github.com/snaplet/postgres-wasm https://github.com/snaplet/postgres-wasm) example a few weeks ago. An idea I'm playing around with is something like: 1. Visit https://postgresql.com/try?version=14.x 2. Visit https://nodejs.com/try?version=16.15.1 3. Visit https://edit.com Edit.com opens a text-editor and terminal where I have access to the NodeJS binary and a connection string to PostgresQL. Want Redis? Open a new tab at https://redis.com/try https://redis.com/try, where the connection string will appear in the edit.com tab.
- screamingninja 4y agoAll three links that you posted appears to be either broken or malicious. Are you just trying to explain a concept using example domain names? Consider ".example" or ".example.com" (see RFC 2606) instead of potentially malicious domains.
- stavros 4y agoHe's saying that the sites could provide ready-to-try binaries of their products that run in a tab immediately.
- DeathArrow 4y agoWhy would I want to compile my app to WASM if it's not running in a browser?
- mikesir87 4y agoGreat question! The promise (and excitement) of Wasm is to have portable, secure, quick-to-start, and low resource usage apps. So, write code in Go, Rust, C++, or any other language that can output to Wasm (up to over 40 now!) and you're good to go! The binaries are super small too. Happy to dive in more too!
- encryptluks2 4y agoA majority of software already does this. WASM seems more like a direct attempt to run binary blobs and to simply "trust" the intrusive binary sandbox while leaking all kinds of information when trustworthy sandbox solutions and multi architecture compilation are nothing new and not a new problem that needs solving. It seems if anything the problem people are trying to solve with WASM is how to get people enthusiastic about handing over more privacy.
- qbasic_forever 4y agoWhy not run that go/rust/etc code natively on the machine though? Is there extra sandboxing, network/filesystem virtualization or anything gained by compiling to and running in a WASM environment?
- saidinesh5 4y agoGained by you running your app on your own server? not much really. Gained by some "serverless" provider who tries to run multiple apps like yours, in parallel on the same machine? Yes. Less process overhead. Probably, less memory footprint too.
- nequo 4y agoAFAIK yes. This interview covers the safety aspects of WASM and you might find it interesting: https://rustacean-station.org/episode/030-krustlet/ https://rustacean-station.org/episode/030-krustlet/