Feeds

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

Making a 'feature' of security

Securing Web Applications Made Simple and Scalable

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. ®

Bridging the IT gap between rising business demands and ageing tools

More from The Register

next story
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
DARPA-derived secure microkernel goes open source tomorrow
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
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.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Seven Steps to Software Security
Seven practical steps you can begin to take today to secure your applications and prevent the damages a successful cyber-attack can cause.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.