4 ms·
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the J
by pron 12y ago
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've probably never heard of, like Aicas and Atego that make hard realtime JVMs for use in avionics, medical devices and other safety-critical systems. The best-known JVMs are HotSpot, OpenJDK's JVM (which serves as the basis for Oracle and Azul's JVMs) and J9, IBM's JVM. When many people say "the JVM" they mean the SE (i.e. "standard edition") of HotSpot.
While HotSpot and the CLR are more similar -- at least in their goals -- than different, and each is ahead of the other in some respects and behind in others, I'd say that the most interesting features of HotSpot are its JIT and GCs (it comes with a few) that are years ahead of anything else used in any other environment in the industry (well, except Azul that sells a modified HotSpot with a "pauseless" GC that never pauses the application for more than a few microseconds). In my opinion, the most exciting development regarding HotSpot is the work being done on HotSpot's next generation optimizing JIT called Graal, that comes with an a complementary language toolkit called Truffle[2]. It pushes the envelopes further with regards to HotSpot's defining feature -- speculative optimization and deoptimization -- and lets the user (if they wish) control the code generation through a clever API.
Another important feature of any compliant SE JVM is bytecode manipulation. It allows modifying libraries after they've been compiled -- either on disk or during the class loading process. One use is dependency namespacing, aka shadowing (if your program depends on libraries A and B, and they each depend on different, incompatible versions of library C, shadowing can hide the two versions of C from each other). But one of the coolest things is the ability to transform (and de-transform) bytecode of running classes (to inject, say, tracing).
Since HotSpot is part of OpenJDK, all work on it (including Graal and Truffle) is open-source (and has been for a few years now). The OpenJDK as a whole is probably the world's second largest open-source project (in terms of contributors), after the Linux kernel. The main contributors are, of course, Oracle and IBM (the latter to a much lesser degree), but also Google, Intel, Apple, Twitter and many more.
[1]: https://www.youtube.com/watch?v=uL2D3qzHtqY https://www.youtube.com/watch?v=uL2D3qzHtqY
[2]: https://wiki.openjdk.java.net/display/Graal/Publications+and+Presentations https://wiki.openjdk.java.net/display/Graal/Publications+and...
- tokenizerrr 12y ago> When many people say "the JVM" they mean the SE (i.e. "standard edition") of HotSpot This changed in Java 7. OpenJDK is now the reference implementation, and thus "the JVM"
- pjmlp 12y agoThe fallacy is that those of us that deal with commercial JVMs have more to choose from than "the JVM".
- pron 12y agoOpenJDK is a lot more than just the JVM (it's also the runtime libraries). Open JDK's JVM is named HotSpot.
- tokenizerrr 12y agoI think the only JVM named HotSpot is the one distributed by Oracle.
- pron 12y agoThey are one and the same. Oracle's JVM is the OpenJDK's JVM, slightly modified (they mostly add monitoring capabilities that were part of the JRockit JVM), and Oracle's JDK (which contains the JVM) is OpenJDK with some minor additions.
- ed_blackburn 12y agoThank you for taking the time to explain. In the past couple of years I've noticed businesses are less beholden to one specific platform. Heterogeneous environments are becoming the norm. As a .NET consultant I've noticed a pattern of node websites, CLR (C#) domains and the JVM rich ecosystem offering systems like Elastic Search or Storm. Knitted together with something like Rest APIs and Rabbit. I really want to appreciate more of the wider ecosystem and the tech that underpins it. I don't see the point in implementing what is proven on the JVM on the CLR. Concentrate on the businesses business (the core domain), not plumbing. In short learning more about these techs in paramount.