InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

JDK 7 Milestone 5 Includes Concurrency and Performance Updates, But Is Not Feature Complete

Posted by Charles Humble on Nov 25, 2009

Sections
Architecture & Design,
Development,
Enterprise Architecture
Topics
Language ,
Programming ,
Language Design ,
Platforms ,
Java
Tags
Java SE ,
JDK 7 ,
JVM

Sun's Java SE team recently released the JDK 7 Milestone 5 build. M5 includes roughly half of the Project Coin features, updates to the java.util.concurrent package from Doug Lea et al, and a number of other enhancements.

The new language features from Project Coin are:

  1. Improved type inference for generic instance creation (diamond) which provides limited type inference for class instance creation, so that where parameter types need to be explicitly declared for a constructor, but could be ascertained from the context, they can be replaced with an empty set of type parameters. Thus instead of writing:
    Map<String, List<String>> anagrams = new HashMap<String, List<String>>();
    You could write:
    Map<String, List<String>> anagrams = new HashMap<>();
  2. Support for binary literals and underscore separators in numbers to aid readability - for example long creditCardNumber = 1234_5678_9012_3456L.
  3. Support for Strings in Switch statements.

The updates to the java.util.concurrent package include support for Phasers, TransferQueues, and the fork/join framework. Alex Miller provides an excellent summary of the included features, and those such as the Fences API and ParallelArray which haven't yet made the cut, here.

In addition to these changes Swing gets a new component, JLayer, for decorating compound components and intercepting subcomponent events, and Sun have also extended the implementation of elliptic curve cryptography to cover all the platforms for which they provide a JRE (it was previously available on Solaris only). Milestone 5 also includes a number of performance related enhancements such as a new faster merge sort algorithm which Josh Bloch adapted from Python’s "TimSort". At the VM level, both escape analysis and compressing 64-bit pointers to fit into 32 bits are now enabled by default for the HotSpot virtual machine, helping to both reduce memory consumption and improve performance.

There are a large number of other changes, a complete list of which can be found here.

Milestone 5 was expected to be the first feature complete release of Java 7 but it is some way short of that. The following table shows the major features which are included in the Milestone 5 release.

vm Compressed 64-bit object pointers
Garbage-First GC (G1)
JSR 292: VM support for non-Java languages (InvokeDynamic)
lang JSR 308: Annotations on Java types
core Upgrade class-loader architecture
Method to close a URLClassLoader
Unicode 5.1
JSR 166y: Concurrency and collections updates
JSR 203: More new I/O APIs for the Java platform (NIO.2)
SCTP (Stream Control Transmission Protocol)
SDP (Sockets Direct Protocol)
Elliptic-curve cryptography (ECC)
client Forward-port 6u10 deployment features
New platform APIs for 6u10 graphics features
Nimbus look-and-feel for Swing

Major features yet to be completed include:

  • Modularisation (Project Jigsaw) and the related Language and VM support for modular programming (JSR 294).
  • A number from Project Coin including Automatic Resource Management, collection literals, language level support for JSR-292, and simplified varargs method invocation.
  • Updates to the XML stack originally slated for the M4 release.
  • The XRender pipeline for Java 2D.
  • The dual-pivot quicksort implementation.

Some of these are really quite close. The dual-pivot quicksort code for example is likely to be in the first build of Milestone 6, build 77, on the 3rd December 2009. Others however are some way off. Project Jigsaw is making progress but currently only has alpha quality Linux-only binaries of M5 available to download. Similarly JSR 294 appears to be some way from completion, and on the expert group mailing list Alex Buckley suggests that the simple module proposal should not be pursued:

Since both Jigsaw and OSGi are defined in the first instance outside the JCP, it does not appear that JSR 294 is well-positioned to define a module system that unifies them. It would be a lowest-common-denominator design with well-intentioned but irksome compromises. There has been no clear support in the EG for the Simple Module System proposal, and I would like to take it no further.

Given that there is still a long way to go on JDK 7, Sun has decided to add three more milestone releases to the schedule and move the feature complete build to milestone 8 (3rd June 2010). This may allow them to include some other features such as multi-catch and, as previously covered, closures to the JDK 7 release, but puts the final release date back by around six months to September 2010.

thanks for the update by Brian Edwards Posted
Re: thanks for the update by Charles Humble Posted
Thank you by Milan Vasic Posted
good news by james mick Posted
  1. Back to top

    thanks for the update

    by Brian Edwards

    Thanks for the update. I'll have to look into it more. Seems like J7 is at least a year away. Probably more like 2?

  2. Back to top

    Thank you

    by Milan Vasic

    First of all thanks on great article. I'm looking forward to see new features on my own very soon.

  3. Back to top

    Re: thanks for the update

    by Charles Humble

    I'm not sure about 2 years. I think the revised timeline for JDK 7 looks pretty reasonable as far as I can tell. It is possible that merger activity might delay it a little but I don't think it will slip much more. Without a JSR for Java 7 though it is impossible to get any sense of when the standard for Java 7 itself might emerge.

  4. Back to top

    good news

    by james mick

    thanks !

Educational Content

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?