Looking through the jdk8-dev archives (albeit slightly late) I found two points worthy of note. First is the JDK8 release schedule (thread view) as well as commendable openness by the release manager of the release schedule and commitment by Oracle. The second is a movement (thread view) in openjdk to migrate from StringBuffer to StringBuilder which in my opinion is fantastic not only as a means of keeping the codebase up to date in a backward compatible manner but also as a performance improvement. Note the lmax disruptor whitepaper in which benchmarks showed how sychronized code can be slower than unsynchronized code even when only executed by a single thread. On a note of curious trivia: Adam Messinger, who hosted the jdk launch event on video has left Oracle for Twitter to become VP of Application Engineering!
Java SE 8 developer preview released with lambda support. The big question now is which editors support Java 8 and lambda syntax? I wasn’t able to find explicit mention of any editors supporting it -I suspect I’ll have to hack around in vim for a while. If you know please comment.
As if you didn’t know – Java 7 is released (1, 2, 3). As the linked post says it’s been a long five years but hopefully more regular release cycles and expert innovation of the kind we’ve already seen in Java 7 will become the norm and turn the droves of skeptics, cynics and deserters back to believing in Java and the JVM as the supreme platform.
The delay hasn’t been all bad. In fact I think it’s been quite positive in many ways. The lack of growth of Java has fostered innovation in jvm languages to try and plug the inadequacies while also creating new things. It’s also spurred its loyal users to do more with less and explore alternative languages and paradigms but also contribute back to Java with what they’ve learnt. And in Java 8 with Project Lambda Java now has the benefit of hindsight in being able to examine, for example, how Scala and Clojure have done things, and take the best of all worlds but at the same it will need to compete effectively with other languages both on and outside of the JVM. The ubiquitous nature of Java means that it must grow and compete in all directions to continue to be so.
This is, in my opinion, as I’m sure you realise – if you look back to what’s gone on in the past year and what is to provisionally come in the next year or two – only the beginning. With Oracle heading Java now this is very much a commercial endeavour and with the first release over the audience is more than ever unrelenting and eagerly awaiting the next.
Aside from knowledge of the jvm – profiler technology is another critical skill to possess in our toolbox. It pays to know how to use them and how to leverage new innovations in them to achieve insight into what your code is doing. Speaking of which jprofiler 7 is released with a number of rather interesting features.
It’s interesting that they’ve chosen to add higher level introspection features such as with jdbc. I’ve always felt that introspection tools shouldn’t just regurgitate verbatim whatever they are analysing but should in addition draw conclusions from such lower level details and offer higher level insights.
A classic example of this would be Eclipse Memory Analyser Tool. It doesn’t just give you a listing of all objects in the heap like most other analysers. It reviews the heap contents and is able to draw conclusions and create higher level reports such as leak suspect reports and dominator reports which not only give you the required numbers but also graphical representations so that you can instantly tell what’s going wrong but then it also allows you to drill down into details. I think this is where introspection tools should be heading in general progressively.
Java 7 release candidate 1 has been released. Those people who thought Java 7 final would be released today (7th) – that is not the case as I mentioned in my previous post. It is simply being launched from a marketing standpoint. It will in fact be released as announced originally on 28 July. The real question now is how long before it gets to production for all of us. Common banks. Show a little courage and adopt early.
Since I’ve never had the good fortune of being able to afford QCon (one day this will change) I appreciate the fact that InfoQ post QCon videos online for free albeit late. Recently I watched ‘Development at the Speed and Scale of Google‘.
Prior to watching this presentation I knew only what I had encountered in the wider industry and really could not have foreseen any of what I was about to watch. The tools that I use on a daily basis and the difficulties that impede me now both seem primitive and outdated in comparison to the progress that Google has made. The key point on the subject matter of this presentation is that it is not about development but what makes it possible to develop at the speed and scale of google: in this case – build and release engineering.
Highlights from the talk that I found worthy of note are listed below.
- Working on build and engineering tools requires strong computer science skills and as such the best people.
- We cannot improve what we cannot measure. Measure everything. This, in my opinion, is a fantastic quote. This stops a team going off on open ended endeavours that yield either intangible or no results.
- Compute intensive IDE functions have been migrated to the cloud such as generating and searching indexes for cross referencing types across a large codebase.
- The codebase required for building and running tests is generally larger than that which is worked upon but delivering the entire codebase to every developer either in source or in binary form would kill the network. Here – a fuse daemon detects when surrounding code is required using a fuse (user space) filesystem and retrieves it incrementally on demand.
- For similar reasons to the above point – they’ve developed a virtual filesystem under Eclipse and contributed it back. The obvious benefit is that directly importing a large code base into Eclipse kills it whereas incremental loads perform.
- They build off source and not binaries and maintain an extremely stable trunk from which they release. If you imagine that all code is in a single repository (in fact the largest Perforce repository in the world) then it really puts into perspective the achievement of using only trunk.
- The designated owners for a given project who review code have at their fingertips all the intelligence metadata on the code to assist them in the reviewing process. If you think about it that makes a lot of sense. To review you need more than just the code to spend your time effectively. You may want the output of introspection, test runs etc.
- Compilations are distributed and parallelised in the cloud and output is aggressively cached. It’s fascinating to hear a case study where this has actually been implemented. I’ve often considered remote compilations but never come across a concrete implementation until now.
The importance of build and release engineering is often underestimated. It is often portrayed and perceived as an area of work that’s second class in nature and rather unglamorous. However, as this talk attests, it is very much the contrary. It can massively boost developer and organisational productivity and efficiency and requires the best people. I’ll end with a quote from the presenter: “Every developer worth their salt has worked on a build system at least once”.
Compared to other v6 release the release of Java SE 1.6.0_18 is definitely worthy of note.
- VisualVM 1.2
- Performance improvements
- 20% faster jar file creation
- Java Hotspot VM 16.0
- Improved NUMA-aware allocation giving a 30% (for 32-bit) to 40% (for 64-bit) increase in performance (which is due also to arrive in jdk7 as well)
- Garbage collection improvements including new default java heap configuration in client and server vms
- Classloading optimisations for faster startup
- Code generation improvements including elision of needless conversions between integer primitive types and optimisations of common string concatenation patterns
- Garbage First (G1) garbage collector improved reliability and performance
- New options to request a heap dump or class histogram before or after a full GC
- Escape analysis based optimisation which appeared in 6u14 has been disabled in 6u18 to be restored in a future update
- Support for Windows 7
- JavaDB 10.5.3.0
- Application startup improvements
- Runtime performance improvements for UI applications
- Ability to read larger zip files of size up to 4GB
As the community eagerly awaits Java 7 in Q4 of 2010 releases such as this one serve to provide a little excitement in the mean time. It’s interesting to see that certain features that are due to arrive with Java 7 are also being offered in Java 6 such as NUMA-aware allocation, G1 collector and escape analysis. For whatever reason escape analysis has been disabled in this release but no reason has been given – it would be interesting to know why.
Jdk6u14 has been released with following notable changes (taken from release notes).
Java HotSpot VM 14.0
6u14 includes version 14.0 of the Java HotSpot Virtual Machine, which provides improved reliability, serviceability and performance.
Contributing to increased performance in this release are numerous enhancements to HotSpot’s optimizing compiler, more efficient SoftReference processing and improvements to Parallel Compacting garbage collection. Optionally available are two new features – escape analysis and compressed object pointers. A preliminary version of the new Garbage First (G1) garbage collector is also included.
Optimization Using Escape Analysis
-XX:+DoEscapeAnalysisoption directs HotSpot to look for objects that are created and referenced by a single thread within the scope of a method compilation. Allocation is omitted for such non-escaping objects, and their fields are treated as local variables, often residing in machine registers. Synchronization on non-escaping objects is also elided.
Compressed Object Pointers
-XX:+UseCompressedOopsoption can improve performance of the 64-bit JRE when the Java object heap is less than 32 gigabytes in size. In this case, HotSpot compresses object references to 32 bits, reducing the amount of data that it must process.
Garbage First (G1) Garbage Collector
Garbage First, or G1, is a low pause, server style collector. G1’s primary advantages over the Concurrent Mark-Sweep (CMS) collector include incremental compaction, better predictability and ease of use. Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased. [..].
To try G1, specify these command line options:-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
In addition, the following options can be used to affect G1’s behaviour:
- To set the max GC pause time goal in milliseconds that G1 will attempt to meet:-XX:MaxGCPauseMillis=<X>
- To set the time interval over which GC pauses totaling up to MaxGCPauseMillis may take place:-XX:GCPauseIntervalMillis=<X>
For more information about G1 (how it operates, more options, etc.) see Java HotSpot Garbage Collection.
Improvement TreeMap Iteration
6u14 includes an experimental implementation of
java.util.TreeMapthat can improve the performance of applications that iterate over TreeMaps very frequently. This implementation is used when running with the
JAX WS 2.1.6 and JAXB 2.1.10
Java VisualVM Updates
6u14 contains the following updates to Java VisualVM:
- CPU usage and GC activity graph in the Monitor tab
- Table view in the Threads tab
- Command line options: –openpid, –openjmx, –openfile
- Compare Memory Snapshots action in the context menu
- Copy To Clipboard / Save To File buttons in the About dialog
- Monitoring IBM JVM via JMX connection
- Based on NetBeans Platform 6.5 and NetBeans Profiler 6.5
- Faster computation of references, and improved readability of path to GC root in HeapWalker
- Improved integration of the Visual GC tool
Click for a list of Java VisualVM bug fixes related to this release.
Spring IDE 2.2.1 has been released but what makes this worthy of mention is that they have addressed two issues which were a problem for me at my last workplace – notably Support for Workspace external configuration files and Ignore missing NamespaceHandler warning. Thanks Spring IDE. For more details follow link to release notes.