What's Exciting About Java 9 and Application Performance Monitoring

What's Exciting About Java 9 and Application Performance Monitoring

FACILITATING THE SPREAD OF KNOWLEDGE AND INNOVATION IN PROFESSIONAL SOFTWARE DEVELOPMENT Java 9 and Beyond eMag Issue 37 - January 2016 ARTICLE ARTICLE ARTICLE Programming with Java 9’s New HTTP/2 A Post-Apocalyptic modularity and and REPL sun.misc.Unsafe Project Jigsaw Java 9 and Beyond // eMag Issue 37 - Jan 2016World 1 Programming with Java 9’s New HTTP/2 and modularity and REPL Project Jigsaw Java 9 will not just be about modularity; it is targeting a large number of additional pieces of functionality. In this article A Tutorial Using the Latest Release Candidate Ben Evans dives into HTTP/2 support and the JShell REPL – Project Jigsaw is the hallmark feature of Java (Read-Eval-Print-Loop) that brings shell-based interactive 9, the next major version release of Java, and is Java development, two new JEPs that may well have the big- destined to bring modular programming into the gest impact on developers’ working lives during the lifetime Java mainstream. After years of negotiating and of Java 9. myriad JSRs and JEPs, Jigsaw is starting to take its final form. This tutorial considers all aspects of programming and migration to Project Jigsaw. Case for Defaulting to G1 Garbage Collector in Java 9 In this article, GC expert Monica Beckwith makes the case for JEP 248, the proposal to make G1 the default garbage collector in OpenJDK 9. A Post-Apocalyptic sun.misc. Unsafe World The removal of sun.misc.Unsafe and other private APIs in Java 9 has in recent weeks divided the Java community per- haps as never before in its 20 year history. Even though a resolution has now been proposed and a migration path pre- sented, the big question remains: What will a post sun.misc. Unsafe world look like? The OpenJDK Revised Java Memory Model The existing Java Memory Model covers a lot in terms of Java language semantic guarantees. In this article we will delve into a few of those semantics, and attempt to communicate the motivation for an update to the existing Java Memory Model FOLLOW US CONTACT US GENERAL FEEDBACK [email protected] ADVERTISING [email protected] EDITORIAL [email protected] facebook.com @InfoQ google.com linkedin.com /InfoQ /+InfoQ company/infoq is the Java queue lead at InfoQ. Inducted as an VICTOR Oracle Java Champion in 2012, Victor works at GRAZI Nomura Securities on building core tools, and as a technical consultant and Java evangelist. He is also a frequent presenter at technical conferences. Victor hosts the “Java Concurrent Animated” open source project on SourceForge. A LETTER FROM THE EDITOR If there were ever any question that Java was the test Java code snippets without having to deal with de facto standard for server side enterprise develop- class structures and compilers. ment, Java 8 has certainly quelled that one. The world If Java didn’t invent the science of Garbage col- now anxiously awaits Java 9 and the innovations it lection, it has almost certainly contributed more than promises. Oracle has slated Java 9 for a March 2017 any other language to that technology. Garbage First release. (affectionately know as G1GC) is the latest offering in In this eMag, we take a look at what’s on the that space, and promises to support huge heaps with scheduled horizon for Java 9 and beyond. minimal stop-the-world pauses. In this piece, former Project Jigsaw is the hallmark feature of Java 9 Oracle GC performance lead Monica Beckwith weighs and is destined to bring modular programming into the benefits of making G1GC the default against pro- the Java mainstream. After years of negotiating and tests that it might not be ready for prime time. myriad JSRs and JEPs, Jigsaw is starting to take its fi- Then low latency expert Christoph Engelbert nal form. Nicolai Parlog gives us the definitive guide looks at another controversial issue, the deprecation to all aspects of programming and migration to Proj- of sun.misc.Unsafe, a widely-used little class that to ect Jigsaw. date has broken all of the rules of Java safety. Then Ben Evans takes a look at two long awaited Finally, the Java Memory Model has served Java Java features, HTTP/2 and REPL. HTTP/2 addresses an- well for all of these years but over time optimizations noying problems coming from the rather rusty HTTP and alternatives have been requested. Monica Beck- support in Java. REPL is a shell scripted version of Java with looks at some of the modifications to the Java that allows developers to quickly and interactively Memory Model being discussed for Java 10. There’s nothing about Java that AppDynamics doesn’t see. AppDynamics gives you the visibility to take command of your Java application’s performance, no matter how complicated or distributed your environment is. Events Health Rule Violations Started 2 Internet Overall Application Performance 1 Information IIS Services AppDynamics Internal Diagnostics 1 Device Business Transaction Health Java 1 critical, 0 warning, 36 normal Server Health 0 critical, 5 warning, 1 normal Java Transaction Scorecard Java Normal 83.1% 963 Slow 0.3% 4 Very Slow 1.3% 15 Java Stall 0.2% 2 Errors 15.1% 175 Shipments DB Java When your business runs on Java, count on AppDynamics to give you the complete visibility you need to be sure they are delivering the performance and business results you need — no matter how complex, distributed or asynchronous your environment, live ‘in production’ or during development. See every line of code. Get a complete view of your environment with deep code diagnostics and auto-discovery. Understand performance trends with dynamic baselining. And drastically reduce time to root cause and remediation. See why the world’s largest Java deployments rely on the AppDynamics Application Intelligence Platform. Sign up for a FREE trial today at www.appdynamics.com/java. appdynamics.com Advertising Feature What’s exciting about Java 9 and Application Performance Monitoring by Aakrit Prasad Principal Product Manager of APM products at AppDynamics Constant innovation in software is driving us toward a software revolution. That may be how the 21st century will be best remembered. Among the popular software languages out there, however, Java continues to have the largest industry footprint, running applications around the globe that produce a combined annual revenue measuring trillions of dollars. That’s why keeping up on the JDK is a high priority. Despite having a massive API to improve programming productivity, Java has also grown due to its high-performance yet scalable JVM runtime, which ranks among the fastest computing applications. As Java’s footprint expands, JDK innovations continue to impact billions of lines of code. As AppDynamics continues to grow, our focus towards supporting Java is only furthered by our customer use and industry adoption of the JVM. Discussion of Java 9 have been growing since the release of Java 8 in March 2014. The scope of various JDK enhancements originally targeted for Java 9 has narrowed as the proposed release date of September 2016 has approached. Over 30 key enhancements, those with the potential for broadest impact, will be shared, and discussion of some of these follows. Project Jigsaw Among the most popular Web proto- Segmented Code Cache cols, HTTP has been getting its own The JVM codecache is critical to ap- upgrade to HTTP/2 (with inspiration plication performance and can be set from Google’s SPDY/2), which boasts at startup time using the -XX:Initial- significant network performance CodeCacheSize=32m flag. When the gains. Java 9 will get its own HTTP codecache memory is exhausted, the client API that implements HTTP/2 JVM losses JIT and goes into interpret- and WebSocket to replace the legacy ed mode, significantly affecting appli- HttpURLConnection, which predates cation runtime performance. In Java HTTP/1.1 and has limitations such as 9, this section of memory is getting the “one thread per request/response” Project Jigsaw contains some of the divided into the three distinct heap behavior. Using HTTP/2 in Java 9, ap- JDK 9 enhancements with greatest segments in order to improve perfor- impact. Jigsaw’s primary goals are to plications will perform and scale bet- mance and enable future extensions: make the JDK more modular and to ter with memory usage on par with JVM internal (non-method) code, pro- enhance the build system. The needs or lower than HttpURLConnection, filed-code, and non-profiled code. to make Java more scalable for smaller Apache HttpClient, and Netty. computing devices, to make it secure, Other Notable mentions and to improve performance and de- jShell Other notable changes in JDK 9 will veloper productivity have driven Jig- include making the G1 collector the saw. With the advent of the Internet default, adding a Microbenchmark of Things (IoT), enabling Java to run testing suite that extends the current on smaller devices is instrumental for JMH, and the removal of some aged continued growth but as Java’s foot- and unsupported performance tools print expands, the vast permutation such as JVM TI hprof and jHat. of computing services it runs on have made it more prone to security target- In jShell, also referred to as Java REPL Summary ing and performance lags. With a more (read-eval-print-loop), JDK 9 users will Although programming languages modular JDK, developers can signifi- find a shell-like interface to interactive- tend to come and go, Java is here to cantly reduce the number of libraries ly evaluate declarations, statements, stay (least for the foreseeable decade) needed to build features, thereby re- and expressions in Java. Like when as one of the most popular and wide- ducing security risks and the size of they use Python or Ruby interpreters ly adopted languages with its highly an application while increasing perfor- or other JVM languages like Scala and performing, scalable runtime.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    35 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us