Feeds

Reality check: Java 8 finally catches a multi-core break

Making a 'feature' of security

Build a business case: developing custom apps

Two years later than planned, Oracle has made Java ready for a multi-core processor world.

The database giant has announced general availability of Java 8, calling it a “major new release”.

Java 8 is important because it’s the base spec for Java Enterprise Edition, as well as feeding the free and open-source implementation of OpenJDK loved by open-sourcers like Red Hat.

Oracle was crowing about a list of changes in Java 8 that, bizarrely and somewhat irrelevantly, includes updates to JavaFX.

For everybody not flogging a doomed alternative to HTML5, the main interest was in two areas that see Java gain rather than break new ground. The first is lambda expressions. Developed from Alonzo Church's work in 1936, they were first discussed for Java in 2010: lambda expressions take the headache out of making Java software run on multi-core.

Lambda expressions have been implemented through a re-write of several core JDK libraries, which will do the low-level work of dividing up the an application’s tasks to run on different cores.

This makes it easier to write multi-threaded code, as code jockeys no longer need to program their apps manually to utilize different processors and cores. And the app itself is lighter, as you’re packing in fewer instructions that’s serving simply as plumbing.

As you’ve come to expect from the Java language and framework, it’s the plumbing of the language and framework that do the heavy lifting.

In the last few years there’s been some guff floating around about a Java “renaissance” and a second coming. This stemmed from the fact LinkedIn and Twitter abandoned hipster-choice Ruby for less fashionable Java. As ever, when it comes to Java, the reasons were performance and scale.

Twitter’s vice president of infrastructure operations engineering Mazen Rawashdeh reckoned in November 2012 that the only way Twitter was able to cope with the micro blogging storm of the US elections was because it rewritten in Java.

A renaissance is defined as a revival; but the Java renaissance has been more a falling out of love with the fashionable Ruby.

Java, though, has never gone away – it’s consistently rated as one of the most used languages, at number-two behind C. People have just had to program around the unpleasant bits, like coping with multi-core.

Multi-core is a tick in the box in today’s world. You’ll find processors with multiple cores on servers and smart phones – relevant in the case of Java thanks to the success of Google’s Android operating system that uses the Dalvik JVM.

It’s something all devs must confront. C++ aficionado Herb Sutter has been saying since 2005 that devs need to write apps that are multi-threaded to take advantage of the speed and performance of multiple cores rather than relying on chip makers to boost the a single processor’s clock speed or its cache.

In some respects, Java 8 is late to this multi-core world. As evidenced by the conversions of LinkedIn and Twitter, on-going popularity of Java and the rise of Android, Java devs have been coping with building multi-core without waiting for the official spec to catch up to the real world.

Now it's here, will Java 8 take the language and platform to new places? Unlikely. It’ll just makes things easier and the apps better.

Even Oracle has admitted Lambda is the only reason for adopting Java 8 and almost everything else being touted by Oracle today is window dressing.

When the Java 8 roadmap hit its second crisis last Spring, Oracle chief architect for the Java platform group Mark Reinhold was frank in his assessment on the importance of Lambda to the success of Java 8. "If we drop Lambda then the remaining features are interesting but not, taken as a whole, very compelling," Reinhold wrote on his blog here. "A Lambda-less release this year would hence be unlikely to gain wide adoption, so why bother?"

The first crisis had seen Java 8 stripped of its other great, flagship feature Jigsaw, designed to provide modularity. Jigsaw had been pulled in 2012 because of “significant technical challenges” that would mean Java 8 would not be able to hit the planned delivery date of “late” 2012, which had been the original goal in 2010.

All of that brings us on to the second big development in Java 8 and a big, new "feature" being touted by Oracle: security.

Java last year was stung by 42 security flaws, 19 severe. Closing these holes proved a proved a bridge too far for completion by the re-worked date of September 2013 and so the finished Java 8 was pushed to now.

Last year, Reinhold had warned it was either Lambda Expressions or security or pushing back the deadline on completion. The result? A Java spec and platform that's not breaking ground but that is at least in better alignment with the real world. ®

Boost IT visibility and business value

More from The Register

next story
The Return of BSOD: Does ANYONE trust Microsoft patches?
Sysadmins, you're either fighting fires or seen as incompetents now
Microsoft refuses to nip 'Windows 9' unzip lip slip
Look at the shiny Windows 8.1, why can't you people talk about 8.1, sobs an exec somewhere
Intel's Raspberry Pi rival Galileo can now run Windows
Behold the Internet of Things. Wintel Things
Linux Foundation says many Linux admins and engineers are certifiable
Floats exam program to help IT employers lock up talent
Microsoft cries UNINSTALL in the wake of Blue Screens of Death™
Cache crash causes contained choloric calamity
Eat up Martha! Microsoft slings handwriting recog into OneNote on Android
Freehand input on non-Windows kit for the first time
Linux kernel devs made to finger their dongles before contributing code
Two-factor auth enabled for Kernel.org repositories
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
7 Elements of Radically Simple OS Migration
Avoid the typical headaches of OS migration during your next project by learning about 7 elements of radically simple OS migration.
BYOD's dark side: Data protection
An endpoint data protection solution that adds value to the user and the organization so it can protect itself from data loss as well as leverage corporate data.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?