NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Webvm: Virtual Machine for the Web (github.com)
apignotti 3 days ago [-]
Hello again HN. Lead dev of WebVM and CTO of Leaning Technologies here. Happy to answer any question from the community.
doctorpangloss 3 days ago [-]
I've heard about CheerpJ and your Flash solution too. You guys pump out a lot of pretty sophisticated web middlewares. Supposing people were fully aware of your technology, which application do you think would have the highest yield to be ported to your portfolio of middlewares?
apignotti 3 days ago [-]
We envision virtualization of corporate internal apps to be of the most interesting markets in the short-medium term. CheerpJ has been very successful in this segment for quite some time already. CheerpX can be seen as an alternative to Citrix, at least for some use cases.

In the longer term we plan to get unmodified Docker containers to work with CheerpX, including exposing REST APIs to the local Web app.

We have also internally speculated about a marketplace-like system to allow immediate conversion of traditional client-side apps to Web apps. This would be intended for the long tail of client software vendors that have not yet adopted Web-first distribution methods.

NikhilVerma 3 days ago [-]
Being able to run docker containers on the web will immediately unlock so many usecases for my work! Right now I've been trying to get a Python sentence parser to run in the browser but it requires a lot of the ecosystem (Pytorch and such). Which is not trivial to compile to WASM.
apignotti 3 days ago [-]
That would fit our vision for a new generation of Web apps with traditional server-side payloads running client-side, with lots of positive impacts on user privacy and operational costs.

The main difficulties right now are two:

* Most docker containers are 64-bit, while CheerpX currently only support 32-bit x86 code * Due to CORS limitations it is not currently possible to downloaded layers from repositories such as Docker Hub

The first limitation will be eventually fixed, the second one will require a specialized repository, a proxy, or co-operation from the existing repositories.

NikhilVerma 3 days ago [-]
I was thinking of a Chrome plugin to enable this, I think plugins can make arbitrary API calls.
JoshTriplett 3 days ago [-]
This is really impressive!

You mention having a "virtual block-based file system". How easily can people integrate other devices into the VM, including custom devices? For instance, if someone had a different network filesystem they wanted to use, which could be tunneled over WebSocket or WebTransport, how easily could they integrate that into this? What's the equivalent of virtio here?

It looks like the client-side bits are largely proprietary? Is CheerpX the primary thing you consider to be your competitive advantage, or is it more about all the layers you're putting on top of that for things like Flash and Java and Oracle Forms and converting local apps to web apps?

It'd be nice to be able to build atop the underlying VM and extend it for all sorts of purposes, the way KVM has been open enough to become a focal point for the modern cloud, and have just the enterprise-y bits and "convert your local app to a web app" framework running on top of that being proprietary.

apignotti 3 days ago [-]
We don't currently expose an API to integrate custom block devices, although it could be possible. We provide an integrated backend based on HTTP byte ranges that can work on any standard compliant HTTP server. See here for more info: https://cheerpx.io/docs/guides/File-System-support#block-dev...

CheerpX is indeed proprietary, but free-to-use for individuals and open source projects. We do want to see the community building on top of our tech. Our Flash product is build on top of CheerpX and the official Flash player plugin that needs to be licensed separately from Harman/Adobe. Java support is provided by a completely different product called CheerpJ, although lots of the ideas and parts of the JIT engines are shared with CheerpX.

At this stage we believe that keeping CheerpX proprietary serves our growth plans the best, this could of course change over time as adoption increases and we build further added-value products on top. On the other hand the WebVM integration is FOSS since it doubles as an extensive sample of what can you build with our technology.

JoshTriplett 3 days ago [-]
> We don't currently expose an API to integrate custom block devices, although it could be possible.

I was thinking more about arbitrary custom devices, like custom network drivers (e.g. to connect to a server-side virtual network rather than tailscale) or custom filesystem drivers at either the block or FS layer.

> At this stage we believe that keeping CheerpX proprietary serves our growth plans the best, this could of course change over time as adoption increases and we build further added-value products on top.

I'd be very interested in chatting with you about our respective products' future plans.

apignotti 3 days ago [-]
> I'd be very interested in chatting with you about our respective products' future plans.

Sure, you can find me and the rest of the team on Discord: https://discord.leaningtech.com

Qem 3 days ago [-]
Can it be installed and run offline as a WebApp?
apignotti 3 days ago [-]
Not right now, WebVM/CheerpX support large disks (1GB+) to be able to run complete distributions. This an advantage of the solution, but it also means that it cannot run completely offline unless we provide a way to pre-download all this data. This does not seem a practical solution.

Fundamentally, a real VM running a real OS needs lots of data.

rahimnathwani 4 days ago [-]
Previous discussion with 632 points: https://news.ycombinator.com/item?id=40940225
James_K 3 days ago [-]
Sad to see Linux turning into a web app. I thought they'd be smart enough to avoid this sort of trend. Hope they continue to support the desktop version.
8n4vidtmkvmk 3 days ago [-]
Unless Linus himself is behind this project, I don't think you have anything to worry about.
johnisgood 3 days ago [-]
Who is going to take Linus' place were something happen to him (hopefully not!), or is it going to be chaos?
8n4vidtmkvmk 2 days ago [-]
I think there's enough interest in Linux desktop that it'll be maintained for a long time yet, even if a web version somehow takes off.
noobface 3 days ago [-]
Poe's law in full effect.
athrowaway3z 3 days ago [-]
I'm waiting for the IPhone app.
mmh0000 3 days ago [-]
balder1991 3 days ago [-]
This is great in comparison to nothing at all, but honestly it’s quite slow since it emulates a different architecture.
odo1242 3 days ago [-]
If you’re interested, a-Shell hits a different part of the tradeoff curve where it can run at native speeds and has most of the important built in utilities like ssh, but it’s hard to install additional native software because of iOS restrictions (though python stuff are ok)
3 days ago [-]
kristopolous 3 days ago [-]
And a SPA no less. Pity
sharperguy 3 days ago [-]
Linux was just an electron app this whole time anyway.
baudaux 3 days ago [-]
In https://exaequos.com, I have designed a new Unix-like OS with kind of microkernel architecture
Uptrenda 3 days ago [-]
I think its cool but am I the only one that doesn't really think the web is a good platform for this? Like, VM stuff needs to be as close to bare metal as possible to be fast. There's special processor features that make virtualisation work well. It's amazingly efficient now. You can vastly over-allocate your hardware between VMs with good modern virtualisation software because they're so damn efficient that they only utilise CPU and memory when they need it. That means they're not just like allocated 4 GBs if you allocate 4 GB to the VM.

All these little optimisations... just aren't going to work well in a browser. I mean, I can already see that alpine (an extremely lightweight VM that I've had boot instantly with vagrant and other such stuff) is slow here. It's a cool hack. I just prefer things to be practical...

solarkraft 3 days ago [-]
There are better approaches to virtualization when that’s your only goal, but this is on the web, which has value in itself.
takemetoearth 3 days ago [-]
No, a lot of people think this. You just won't find most of them here.
abixb 3 days ago [-]
Student here, and this has to be the most satisfying 20 minutes I spent cloning a GitHub repo in a while.

Here are a few things I encountered which might probably help others:

    # Version mismatch: 
    The install version of node.js I had (v12.22.9) was too old to meet the project's requirements (>= 18.13). 
To fix that, I used nvm to install the right Node.js version (>18.0)

    # Version check before install: Used the following to check version to verify before proceeding ahead with building it:
    node -v
    npm -v
It ran successfully, and I've been playing around with built-in Python3 and C scripts and pushed the modified repo to my personal GitHub. Thank you, dev!
apignotti 3 days ago [-]
Thank you, appreciated.
benchmarkist 4 days ago [-]
Networking over websockets with tailscale is a nice touch.
zb3 3 days ago [-]
Note this repository doesn't include source for CheerpX, which is the main component of WebVM.
maxloh 3 days ago [-]
Yeah, the project is merely an open-source wrapper to promote the underlying proprietary library.
jeswin 3 days ago [-]
Very cool project, and great for many usecases. In absolute performance, I find it about 16x slower than CPU [1], but it'd still be super fast compared to the full Linux GUIs we were using comfortably in the 90s/2000s on slower CPUs. Might work for sandboxing user code as well.

[1]: My utterly naive benchmark completes in 9s - time seq 1 50000000 | wc -l

westurner 4 days ago [-]
/? "webvm" jupyter: https://www.google.com/search?q=%22webvm%22+jupyter

- "Is WebVM a potential solution to "JupyterLite doesn't have a bash/zsh shell"?" https://news.ycombinator.com/item?id=30167403#30168491 :

- [ ] "ENH: Terminal and Shell: BusyBox, bash/zsh, git; WebVM," https://github.com/jupyterlite/jupyterlite/issues/949

And then now WASM containers in the browser FWIU

punnerud 3 days ago [-]
It also supports Tailscale (or the other way around). If you use SSH from Tailscale Admin it’s actually WebVM you see: https://labs.leaningtech.com/blog/webvm-virtual-machine-with...
apignotti 3 days ago [-]
CheerpX uses Tailscale, not the other way around. The Tailscale SSH client is built on the same Go stack (compiled to Wasm) used by CheerpX uses.
DeathArrow 3 days ago [-]
Cool, starting with this we might see Linux being implemented in Javascript. /joking
sudo_bang_bang 3 days ago [-]
Can I run WebVM inside WebVM?
TuringTest 3 days ago [-]
It's penguins all the way down
tertle950 3 days ago [-]
Remember when the web was just for displaying documents? Yeah, me neither
takemetoearth 3 days ago [-]
Doesn't sound very monetizable.
xnx 3 days ago [-]
The networking workaround is clever, but still too complex for the casual user. My dream of safe, easy, local apps, with networking and persistent cloud storage is still on hold.
kkfx 3 days ago [-]
Maybe your dream is named Plan 9?
DeathArrow 3 days ago [-]
Cool, starting with this we might see Linux being implemented in Javascript.
lofaszvanitt 3 days ago [-]
Who needs this in the browser and for what purpose?
odo1242 3 days ago [-]
This company makes a tool to performantly run Linux code in the web browser and uses it to emulate Flash / Java, among other things. This is a test demo of the tool.
z3t4 3 days ago [-]
Is there a server if you want to run your own WebSockets as a transport layer?
apignotti 3 days ago [-]
You can use the self-hosted version of the Tailscale control plane, called Headscale, but you need our own fork since the upstream version has various issues. We plan to merge these fixes upstream soon.

For more info, see the last few paragraph of the Networking section from our latest blog post: https://labs.leaningtech.com/blog/webvm-20#private-networkin...

colesantiago 3 days ago [-]
bouncycastle 3 days ago [-]
Imagine the performance boost if you removed the browser
3 days ago [-]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 15:30:52 GMT+0000 (Coordinated Universal Time) with Vercel.