3 ms·
Yeah it's not really JVM. The thing with these kinds of ports is that they do some 'neat stuff' but ultimately, they don't come close to the real thing, often,
by jasmer 3y ago
Yeah it's not really JVM.
The thing with these kinds of ports is that they do some 'neat stuff' but ultimately, they don't come close to the real thing, often, not close enough to be a material substitute.
The JVM is a very sophisticated and nuanced thing, 'duplicating it' and the standard libs is a very big deal.
Theses are cool projects though and they have their use.
- brabel 3y agoIt is absolutely a real JVM. From the link: "CheerpJ is based on an unmodified OpenJDK environment, guaranteeing the same behavior on the browser compared to a native JVM. It includes many emulation layers to ensure Filesystem, Networking, Printing, Clipboard and many other subsystems work seamlessly." Did you actually manage to find anything that works in OpenJDK but not in CherpJ 3.0?
- jasmer 3y agoDirect buffers? I mean, they're going to be 'virtual direct'? Or can I can't fathom how but I would imagine they're not going to be 'actually direct'.
- brabel 3y agoWASM has memory, and any native code compiled to WASM will allocate on WASM memory. CheerpJ's runtime is written in C++, which when compiled to WASM knows how to allocate memory, so there's no reason why direct buffers won't work.
- jasmer 3y agoDirect ByteBuffers are used to interop with the underlying platform, particularly for the purpose of IO. I could be wrong, but I fail to see how 'WASM memory direct Buffers' will work in that scenario.
- lxgr 3y agoWhat IO devices would you even have access to from a browser sandbox?
- jasmer 3y agoWhat app is going to function without IO?
- pjmlp 3y agoA CPU warmer. :)
- jasmer 3y agoExactly. These 'ports' are more intellectually exciting than the are pragmatically useful, but they definitely can be useful, it's a matter of having the right product parameters around what they are good for and what not. This is really an exercise in engineering thinking vs. product or 'solution oriented' thinking. You can usually tell where people's heads are at by how they react to these kinds of things. Should note that 'people doing stuff because' is a core part of organic development, most things would not exist without that ethos floating around.
- lxgr 3y agoHave you looked at the vendor’s website? This doesn’t strike me as a purely academic/intellectual "because we can" project at all. And you still haven’t explained in any way why the lack of DirectBuffers or "IO" is a disqualifier for being able to run legacy applets in a modern browser without a JRE or other plugins.
- jasmer 3y agoJust the opposite, the company has been around for 10 years and they have are an intellectually oriented professional services provider. This is quite common. The VM they built may or may not be a direct demand from a customer, my bet is it was an idea that someone had and they decided to make it, to see if there was some customer buy-in. There might be a niche need. The problem with the 'A Customer Can Run An Applet In A Browser' as a solution, is because this won't materially work for most wide, public style deployments - there will be any number of snafus, and for more 'internal' style IT deployments, there are just easier, more robust ways to deploy a Java app. I have explained how 'Direct Buffers' are a problem to anyone who understands what VM and Direct Buffers used for (they are inherently about bridging to native memory), which obviously is not going to be accessed in WASM context. Actually - WASM itself is a great analogy for what is going on here. It's 'perennially almost there' tech aka a neat idea that has limited value in the real world, it's been around for so long and there isn't that much activity, or at least not commensurate with what it's supposed to be able to do. By the time WASM catches up, the performance of JS in V8 gets so much better it becomes 'good enough' which obviates the need for WASM. And so on it goes. Something may eventually come from JVM in WASM, but what we see is a very early experiment.