Feeds

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

Making a 'feature' of security

The Power of One Brief: Top reasons to choose HP BladeSystem

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

Securing Web Applications Made Simple and Scalable

More from The Register

next story
Apple fanbois SCREAM as update BRICKS their Macbook Airs
Ragegasm spills over as firmware upgrade kills machines
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
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Captain Kirk sets phaser to SLAUGHTER after trying new Facebook app
William Shatner less-than-impressed by Zuck's celebrity-only app
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
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.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Reducing security risks from open source software
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.