7 ms·
The idea of isolation that java espoused is not a bad one - it just wasnt executed well. Its not a java only idea either - see Native Client[0]. As with all thi
by jzoch 8y ago
The idea of isolation that java espoused is not a bad one - it just wasnt executed well. Its not a java only idea either - see Native Client[0]. As with all things, execution and marketing matter. Java was lacking in both.
[0] - https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/34913.pdf https://static.googleusercontent.com/media/research.google.c...
- naikrovek 8y agoOK, that's all correct and valid. Java still exists and is a valid deployment platform. Why is WebAssembly outside of the browser needed?
- JeremyBanks 8y agoUsing Oracle's Java Programming Language is an immeasurable legal liability.
- deleted 8y ago[deleted]
- naikrovek 8y agoThere are open source and non-Oracle Java virtual machines you can buy support from if Oracle isn't your cup of tea. It's not really a legal liability either. Lawyers for companies who use Java go over those agreements with a fine tooth comb and approve them before they're signed. There are no surprises (if your attorneys aren't frauds.)
- JeremyBanks 8y agoGoogle's was not using Oracle's virtual machine, and their attorneys were not frauds, but they've been tied up in litigation for most of a decade and are facing potentially ten billion dollars in penalties. https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google.... Java is not a responsible or ethical choice for anybody to use for any purpose.
- pjmlp 8y agoThey just screwed Sun, created Android J++ with applause from wannabe be Google employees, and turned down the opportunity to buy Sun and own Java. They deserve what they get.
- pdpi 8y agoGoogle's case is less one of "using" Java, and more one of reimplementing it. It's an entirely different legal beast.
- pjmlp 8y agoI am pretty sure IBM has a couple of patents regarding VM implementations.
- chubot 8y agoJava is no longer a valid deployment platform for dynamically executing untrusted code. https://www.java.com/en/download/faq/chrome.xml https://www.java.com/en/download/faq/chrome.xml The Java Plugin for web browsers relies on the cross-platform plugin architecture NPAPI, which had been supported by all major web browsers for over a decade. Google's Chrome version 45 and above have dropped support for NPAPI, and therefore Java Plugin do not work on these browsers anymore. All the other browsers killed it as well. There's probably some way you can do it outside the browser, but I've never seen it used. Was it called Java WebStart or something? I think it's because the sandbox had too many holes, and it was large and clunky. It didn't integrate well with the browser. Java is obviously still extremely popular, but it's used in trusted contexts, like on the server, or "semi-trusted" contexts, like the Android app store. Although that is a different JVM which is probably easier to secure. And in that case there has to be a manual review process before allowing arbitrary code to execute (which is imperfect, but better than nothing.)
- AnIdiotOnTheNet 8y agoIt remains to be seen if WASI will actually have fewer holes in its sandbox. Fundamentally it is not different.
- chubot 8y agoI think an important difference is that in the new architecture, there's a separation between WASM and WASI. That is, computation and I/O are treated separately. It's more like capability-based security. WASM modules have no capabilities except the ones explicitly injected when you instantiate it. As far as I understand, the JVM wasn't as rigorous about this, although to be fair I don't know all the details. So WASI could still have a lot of holes, but WASM would survive and be useful. And then maybe someone else could come around and do it in a different, better way. That hasn't happened with Java.
- naikrovek 8y agoJava inside the browser doesn't exist. That's fine. That's not what I'm talking about or making comparisons to. Java runs just fine outside of the browser. You don't even need a browser installed to run Java applications. Javascript and WASM run fine inside the browser, and that's not what I'm talking about or making comparisons to. I'm talking about running WASM binaries outside of the browser. Similar to how Java runs outside of the browser. Very similar, actually. Java needs a runtime to be installed or available, so will WASI. Java is a write-once-run-anywhere type of platform, so is WASI. Why does WASI need to exist if Java already exists for the intended uses?
- RivieraKid 8y agoWell, the second paragraph in the article gives you the answer: > Why: Developers are starting to push WebAssembly beyond the browser, because it provides a fast, scalable, secure way to run the same code across all machines. It allows you to use the same code both inside and outside of the browser. For example, Figma might use it, they already have a web app and a regular app, both using WebAssembly, so WASI would perhaps simplify their code or allow them to add more native integration to their app. Making a product that's a slight variation of an existing product is often enough to gain significant market share. For example, was Chrome needed when there was Firefox? Was Figma or Adobe XD needed when there was Sketch? Is Rollup or Parcel needed when there is Webpack and Gulp? This could go forever. I mean, should Java be the only universal deployment platform?
- sitkack 8y agoSigned types and a proper cross language target. There is very little technical difference between the two, esp now that GraalVM has shipped. WASM is now the portable executable standard. https://www.graalvm.org/ https://www.graalvm.org/
- smolder 8y agoI'm sure this was meant to say unsigned types - Java only uses signed types.
- sitkack 8y agoCorrect, my mistake. unsigned types.
- imtringued 8y agoSo you're saying the JVM wasn't good enough so they had to make a better one? Why does the HN crowd constantly compare WASM with the "obsolete" JVM, when even the creator admits that it is not adequate?
- sitkack 8y agoJVM could have been WASM but they made some unfortunate design decisions. They started as a target only for Java, GC, signed types. WASM started from the bottom, floats and ints (signed and unsigned) with plans to add GC, threads etc later. It isn’t that the JVM is bad, it is that it isn’t the universal compilation target that WASM is. Remember folks getting excited about LLVMIR, Bitcode? WASM is this but with a clean sandbox and minimal tractable semantics. The JVM is awesome, esp with Graalvm and Truffle. WASM is the next evolutionary step.