_:na7dd5813570e4e589fc89f362b10b12fxb4
<http://schema.org/articleBody>
"Java's had  , which has led to security consultants and even government agencies calling on users to uninstall Java from their PCs.\nBut enterprise Java is still an important technology – at the heart of many important cloud platforms and in enterprise servers, where it's a business-critical technology.\nBack at QCon, the cross-platform developer conference, I sat down with Gil Tene, the CTO and co-founder of JVM vendor Azul, to talk about how a well-designed JVM can take the risk out of running enterprise-grade Java service and applications.\n \nThe Java Virtual Machine allocates a section of memory, its \"heap\", for use by objects and their associated data. With today's demand for in-memory processing and faster applications, the heap associated with a modern JVM can be very large indeed – possibly most of the memory on a modern high-end server. As the heap is managed by Java, it needs to be periodically cleaned out of stale objects and unused data. This garbage collection can be slow and resource intensive, making programs suddenly stall while Java reorganises its memory.\nAs such, with massive Java applications working with huge amounts of data, the risks come from Java's own garbage collection routines. They're non-deterministic and scavenge memory unpredictably.\nThat can stop your application in its tracks, and if you've got terabytes of heap in use, that pause can last a long time. In many cases that might not be an issue, but if you're running an ecommerce system and a pause interrupts a purchase, or a trading system and a trade suddenly halts, your business will be affected by lost customers and unbalanced and unprofitable delayed transactions.\nAzul began life with a dedicated Java processor, which used a massively parallel architecture to handle complex Java applications in silicon, rather than a Java Virtual Machine. Azul's Vega remains a unique implementation of Java, one where a stub JVM handed byte code over to silicon – and where the heap was dedicated memory.\nThat let Azul handle garbage collection in a more predictable manner, with very little effect on your code.\nThe rest of the silicon world eventually caught up with Azul's technology, and by the time Intel released its x86 Nehalem processors, it was possible for Azul to switch from its own dedicated silicon to commodity hardware. Azul's Zing JVM builds on its hardware history to deliver an enterprise-grade JVM that out-performs the commonly-used consumer-based JVMs.\nAs Tene points out, managing the Java heap is key to getting the most out of your hardware, \"Most developers are using less than four percent of their server capabilities,\" he says. \"Our new JVM will run at the scale of the hardware you can buy.\"\nHandling heap and garbage collection is key to offering low latency applications on Java, especially where latency can be an issue, in messaging and in trading. It also means not having to resort to complex programming techniques to handle memory – there's no need to fear large amounts of memory, allowing the use of sparse arrays, and faster, lower power programming techniques.\nChanging the way Java does garbage collection can deliver significant advantages, allowing apps to run without being inconsistent.\nWhile apps can have response times of the order of tens of microseconds, with most JVMs you will get jittering, as the system randomly pauses to handle garbage collections.\nWhile you can use tricks (like rebooting a system daily) or use complex programming methods that don't take advantage of key Java features to avoid this, they slow down development and don’t allow the rapid deployment of new trading algorithms – where delivering a new app quickly can be the difference between profit and loss as more efficient algorithms replace the tools you’re currently using.\nAzul's Zing means that instead of using work arounds, you can use off-the-shelf techniques, librariesand best practices to build new apps quickly, without having to train new developers in heap-friendly programming techniques.\nTene says of the result: \"You have Java again, with the long-term bigger benefit of quicker, cheaper, less rigorous development.\" For many organisations, that's a big win."
<https://www.zdnet.com/article/making-sure-your-java-isnt-a-load-of-old-rubbish/>