9 ms·
No slight against WASM (which I've promoted), but early Java people would be well-advised to sit down somewhere they can sob in privacy, before reading this art
by neilv 8y ago
No slight against WASM (which I've promoted), but early Java people would be well-advised to sit down somewhere they can sob in privacy, before reading this article:
> ...you can't run Java code in a browser without a plugin...
> ...WASM, being memory safe and tuned for validation, also has security advantages over Java applets...
> ...explained the difference between WebAssembly and Java thus: "WebAssembly has been designed to scale from tiny devices to large server farms or CDNs...
> ..."That's how important it is. WebAssembly on the server is the future of computing. A standardized system interface was the missing link...
> ...But a write-once, run anywhere binary represents a worthwhile effort...
- olliej 8y ago1. is true 2. Yeah, I read that and was super confused. Literally that was one of the main point of the Java language itself, enforced by the JVM itself. 3. I think this is more a matter of expected level of abstraction, but I agree this is fairly weak. 4. This just seems like standard "the new thing is vastly superior to the old thing", with a valid touch of "the JVM is too heavily abstracted from how computers work" 5. Yeah, this was also weird.
- TimTheTinker 8y agoI think what he means is that these were literally the same promises that were made about Java and the web back in the early 1990’s. Java was the solution that would provide a robust, symmetric (server+client), secure, highly capable, and portable platform for complex web applications. Early Java folk weep because Java failed so badly on the client, and something else is stepping in to do what Java could not.
- pjmlp 8y agoJava has been quite successful on my client devices running on my pocket, TV and tablets. Also on client devices running on my credit card, factory management client screens and couple of car infotainment systems. And on client devices across many corporations still safe from Electron madness.
- olliej 8y agoJava applets are how a depressingly large amount of CC processing happens. (I think Java Card maybe? is responsible for CC handling in all the magic CC features in phones)
- olliej 8y agoSorry, which point were you referring to? (I recognize the article as bad, I'm just not sure which problem you're referring to :D )
- regularfry 8y agoI think the article author knows exactly what they're doing. "Write once, run anywhere" was literally Java's strapline.
- neilv 8y agoThank you for clarifying that. Also, one thing less-known than that Java applets were in the popular Web browsers at one point (when JavaScript was said to be just a glue language to invoke the Java applet), was that Sun already had a richer, Java-centric Web browser, which used Java for content-type handlers. Imagine providing content as data of some type/format, and the browser would automatically download an appropriate UI for that type, on the fly, and integrate it into UI, and it would all be secure. (I first saw Java when it was called Oak, and Sun had great people doing major things, Java only one of them. When Java applets first hit conventional Web browsers, most people thought they were for replacing animated GIFs, thanks to a demo program. I probably wrote some of the first Java desktop application code outside of Sun, partly to demonstrate that Java was a real applications development language. Well, the language was there, and in many ways a huge improvement over the C++ that most shrinkwrap and technical desktop application developers were moving to, though the library support took a while to catch up, and performance took longer.)
- iforgotpassword 8y agoYou mention it in your last sentence, but most of these tales forget to mention it at all: java was slow. I mean, slooooooooooooooow. And that reputation stuck for much longer than it was actually true. Java applets were an abomination and you wanted to repeatedly stab yourself in the head while using even a simple one. On a then-average p166 with 24mb of ram, your browser would go unresponsive while loading, jumpy mouse cursor, os starting to swap, and then some irregular annoying hangs while the GC did its thing. Not to mention how ugly awt and swing looked even back then. Modern web is a joke regarding resource usage and complexity etc., but java was a shitshow in practice, except on beefy servers.
- 0815test 8y ago> On a then-average p166 with 24mb of ram, your browser would go unresponsive while loading, jumpy mouse cursor, os starting to swap, and then some irregular annoying hangs while the GC did its thing. Reminds me of client-side JS frameworks. Or Electron apps. > Not to mention how ugly awt and swing looked even back then. Web UI is still as ugly as ever, of course. Peak UX usability was native UIs in the 1990s and early 2000s, after that it was nothing but steady decline.
- dragonwriter 8y ago> I think what he means is that these were literally the same promises that were made about Java and the web back in the early 1990’s. And as a whole (except for run in browser without plugin, which was never promised, AFAIR), they were all true or Java, relatively speaking, compared to what was available before.
- quantummkv 8y agoI am not surprised. As someone who cut his programming teeth on Java and .Net, modern web development feels really out of touch with reality. I really don't get why the community is hell bent on reinventing the wheel, especially when the main defense of npm is that you don't have to reinvent the wheel. It's really disheartening to see that the best minds of the generation are busy spending time to reinvent the same old things instead of trying to improve upon the existing systems.
- manigandham 8y ago.NET ecosystem is fantastic right now. .NET Core is fast and efficient, asp.net is better, faster and more full-featured than ever, and MS is ahead of everyone with Blazor Components that finally provide a real alternative to JS frontend frameworks and can run either server-side or as WASM modules.
- nwah1 8y agoI agree largely from a development perspective, but the client-side javascript frameworks are ultimately more performant, particularly on mobile, and are not as bad as they used to be. Neither server-side nor WASM are ideal for mobile devices. Downloading many megabytes of .NET dependencies for a WASM app is obscene compared to like 30 kilobytes for React.
- thefounder 8y agoWith 5g that won't be an issue anymore...
- sdfsdfsdfsdf3 8y agoIn 2026 maybe...
- quantummkv 8y agoUntil they decide that 5g is good enough to allow them to ship the browser with every website. Net speeds have been increasing every year and yet the websites take longer to load.
- DonHopkins 8y ago>"WebAssembly has been designed to scale from tiny devices to large server farms or CDNs..." What's ironic is that the "tiny devices" and even "high end professional desktop workstation and server devices" that Java was originally designed to run on when it was started in 1990 were MUCH tinier than the devices considered "tiny" today. How many more times faster is a typical smartphone today (Raspberry Pi 3: 2,451 MIPS, ARM Cortex A73: 71,120 MIPS) that a 1990 SparcStation 2 pizzabox (28.5 MIPS, $15,000-$27,000)? http://www.wikiwand.com/en/Instructions_per_second http://www.wikiwand.com/en/Instructions_per_second
- steve19 8y agoForget full computers, an official Java subset even runs on every GSM SIM card. It is incredible! https://en.m.wikipedia.org/wiki/Java_Card https://en.m.wikipedia.org/wiki/Java_Card
- IshKebab 8y agoPeople keep bringing this up but Java Card is a really small subset of Java so you can't draw any conclusions. In particular it has no garbage collection, which is easily the heaviest part of Java. > Many Java language features are not supported by Java Card (in particular types char, double, float and long; the transient qualifier; enums; arrays of more than one dimension; finalization; object cloning; threads). Further, some common features of Java are not provided at runtime by many actual smart cards (in particular type int, which is the default type of a Java expression; and garbage collection of objects).
- ktta 8y agoTo add on, here's a quick intro to the headache that goes into writing Java for GSM cards - https://youtu.be/31D94QOo2gY?t=607 https://youtu.be/31D94QOo2gY?t=607
- tluyben2 8y agoBut writing Javacard for ICCs is like writing another language and ecosystem entirely. The syntax is familiar but there the comparison kind of ends.
- ksec 8y agoThe only difference is that WASM will be available ( I assume ) in most PC Chrome Browser within 2 - 3 years of releasing, that is 800M+ assuming Chrome with stable market shares. Along with Android, that is a potential of 2-3B devices, assuming stable upgrade cycle and shipment. That is more penetration than Java could ever get on Desktop and Mobile. Although Java is actually doing ok in embedded space, I am not entirely sure how WASM would work for that segment.
- majewsky 8y ago> Android [...] assuming stable upgrade cycle and shipment Good one.
- analognoise 8y agoMaybe my sarcasm detector is failing, but: Java is the most used programming language in the world (https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/) It not only powers all kinds of desktop things, it is foundational to Android, which currently powers ~85% of all mobile devices. How can you get more penetration than "most used programming language" and "foundational to the largest mobile OS"? I mean there isn't even a category that fully encompasses the degree of dominance of Java. The next step, I assume, would be to rename "Programming" (all of it) to "Java".
- ksec 8y agoI should have use the word JVM rather than Java. My Apology.
- dmitriid 8y ago> WebAssembly has been designed to scale from tiny devices to large server farms or CDNs Has it, though? What we have now is an MVP, and easily 90% of the features aren’t there yet. When WASM gets garbage collection, will it still be able to run on tiny devices? We don’t know yet.
- asdkhadsj 8y agoI would hope it's opt in for those scenarios. If the host is too "tiny" to carry around GCs, then a whole host of languages are not viable anyway. Requiring a GC wouldn't do them any favors.
- dmitriid 8y agoHard to say without reading all the specs/proposals: https://webassembly.org/docs/future-features/ https://webassembly.org/docs/future-features/ But yeah, even specification itself is WIP
- phkahler 8y agoFrom TFA: >> Mozilla this week announced a project called WASI (WebAssembly System Interface) to standardize how WebAssembly code interacts with operating systems. This is just another implementation of holes that allow web sites access to the rest of your system. It really is supposed to be the operating systems job to manage resources and what can be accessed. The problem is this functionality keeps getting re-implemented by others with different agendas.
- redbergy 8y agoI thought the point of WASI was to give you an API that allows you to bring your WebAssembly apps out of the browser and run on the OS itself, not to allow deeper integration of the app in a browser to the underlying OS. Edit: words
- burnte 8y ago> This is just another implementation of holes that allow web sites access to the rest of your system. Well, unlike systems designed in the 90s, it's designed for the modern "everything-is-a-threat" mindset rather than the optimism of the 90s that everything would be safe.
- TUSF 8y agoWhat? No. WASI isn't meant to be implemented by the browser. It's meant for WASM runtimes outside of the browser, like Lucet and Wasmer. People have been experimenting with "WASM outside the browser" for a while now, and WASI is just an API for making OS calls that a runtime can implement.
- asdkhadsj 8y agoI'm so often confused by these comments. Are you saying that we could stick a JVM in the browser and ship Java applets around to be progressively/streaming loaded and executed in browser? I don't know much about the JVM but it seems the goal of WASM and the JVM were quite different, no? And yes, WASI has overlap with JVM, but if WASM catches on and people like it, how does WASI make any less sense? Are you advocating we have WASM and JVM but no WASI? Is that better? Not sure why anyone is crying here..
- that_jojo 8y ago> Are you saying that we could stick a JVM in the browser More or less. I mean, that used to be a thing you know. > the goal of WASM and the JVM were quite different WASM: A universal write-once, run anywhere bytecode for heterogeneous networks of systems JVM: A universal write-once, run anywhere bytecode for heterogeneous networks of systems
- asdkhadsj 8y ago> More or less. I mean, that used to be a thing you know. I did not know Java applets can be stream loaded (ie, optimized for the web). > WASM: A universal write-once, run anywhere bytecode for heterogeneous networks of systems Not at all.. at least, not in my view. WASM is optimized for platform issues specific to the web. That is to say, how it behaves on load is the first priority. I never got that impression from the JVM. If you say it is, then it seems to be a failure in marketing of the JVM or something. Since you seem to feel WASM is a waste, what are your thoughts on the failure of the JVM? Ie, why don't I have Go and Rust compile targets for the JVM, with JVM browser code running my JVM targets and etc? If JVM truly does have all of these WASM-web oriented features then it is an impressive failure on JVMs part. Quite curious
- otabdeveloper1 8y ago> ...why don't I have Go and Rust compile targets for the JVM, with JVM browser code running my JVM targets and etc? The JVM is not a true VM. It's heavily coupled to the Java object model and the Java GC.