Ever since Mark Reinhold's announcement at DEVOXX that Java 7 will include closures, I've found myself thinking a lot about where we are headed with respect to desktop computers, how Java fits into that, how the cloud fits in, etc. It makes sense that the future will include many-core processors, which will be available even in budget-priced systems. What will we do with all those processor cores? Well, that depends on the nature of the software we'll be running on our systems.
In Mark Reinhold's Closures for Java post, which was written soon after the DEVOXX announcement, he said that it is because of the emergence of multicore processors that closures are needed in Java. Why? Because:
I was initially somewhat confused by these statements, because I thought Java had everything it needed for efficient use of multiple cores in its threading libraries. The results of our (unscientific) November poll Is Java's parallel programming support sufficient to meet 'the Multicore Challenge'? suggest that quite a lot of developers (34%) believe the same thing. 18% thought that with the addition of closures, Java will have adequate parallel programming support.
Do you agree that adding closures to Java is needed to enable Java to meet "the Multicore Challenge"?
Adam's response:
I'm not sure about that. You can run perfectly scalable code right now with plain Java. Closures could make it more convenient - but it isn't impossible to write multicore code without them.
But -- another question is: are we moving away from desktop applications anyway? Look at the purchase of Playfish by Electronic Arts:
The acquisition of Playfish falls in line with EA's desire to be more than just a developer for traditional gaming platforms, like consoles and the PC. The company said in a statement that the acquisition "strengthens its focus on the transition to digital and social gaming."
It's not "we want to diversify into social gaming"; rather, it's taken for granted that social gaming is replacing digital gaming. And where does social gaming actually take place? In the cloud, not on your multicore desktop.
So, then, is the Multicore Challenge becoming a moot point as people migrate ever greater shares of their computer-based activity into the cloud? My little HP Mini 1120NR netbook does a fine job with FaceBook, Twitter, and BlogBridge; it's great at conferences; I can even set up the java.net home page and write my blogs on it (though I prefer my larger desktop screen for that work). Sometimes I even turn off my quad-core desktop (500 Watt power supply) and use the Mini for periods of hours, to save on my electric bill (also, in the winter, to minimize the chance for the quad-core to overheat, which happens on occasion when the corn stove we use to heat this end of the house is running).
Then, too, there's the iPhone, Google's Android platform, etc. Larry Ellison even hinted at the creation of an Oracle/Sun phone at JavaOne. At minimum, Oracle/Sun would be very active in developing software for mobile devices. While I remember Ellison saying these things, I'll point you to a Wall Street Journal article for reference. Talking about mobile devices, Ellison said:
"I don't see why some of those devices shouldn't come from Sun-Oracle."
And he also said:
"I think you'll see us get very aggressive with Java and developing Java apps for things like telephones and netbooks."
So, then, might the desktop computer itself be kind of on the way out? Probably not, but if the great majority of apps people want to run actually perform their processing on remote server farms, with the local activity being simply a user interface that sends out requests and receives and displays responses, how much of a need will there be for heavy-duty multithreaded applications that run locally? And, thinking about Java, doesn't Java EE 6 provide everything we need on the server farm end?
The year is coming to an end, and it’s time to review what has happened on this blog over the last twelve months. I’ll start the top ten most read posts, and then list my own favorites. Let’s start with the top ten most read posts published in 2009 as measured by Google Analytics ...
As illustrated in the movie Finding Nemo, clownfish and sea anemones have a mutual symbiotic relationship. The latter Wikipedia article states that "The territorial [clown] fish protects the anemone from anemone-eating fish, and in turn the stinging tentacles of the anemone protect the clownfish from its predators. A special mucus on the clownfish protects it from the stinging tentacles". Of course, as also demonstrated in Nemo, mutualism breaks down when uninvited barracudas join the party ;-) ...
Yet another NetBeans Platform application is... the music creator, which is a MIDI synthesizer with keyboard and danceboard integration. "The requirement for this project was to use a dancing board as an input device for our program. Instead of creating a program where people can dance on, we decided to do the opposite. By pressing the buttons on the dance board or keyboard you can create sounds. You are able to record those sounds. After making a couple of recordings you can arrange them on the recording tracks and play them as if they were one song." ...
I got some difficulties following the tutorial about creating components with JSF 2.0, mainly due to some obsolete instructions and Maven dependencies of the more than 1 year old original articles of Ed Burns. I wrote down upgrades instructions in a hope to help other newbies to create composite UI with JSF 2.0. Nevertheless, you should read the original text because I won't explain the concepts behind creating Composite User Interfaces and neither rephrase Ed Burns. I will just give you en updated version of the same project, with the same xhtml code. I am using Eclipse on the Karmic Koala Ubuntu 9.10 but the below instructions should work everywhere :) ...
As I happily wrote about new features of JSF 2.0, my coauthor David Geary kept asking me how to run the examples in Tomcat 6. I kept putting it off—hunting down all those JAR files and web.xml fragments is just too much like eating soup with a fork. I finally got around to doing the research and thought that others might benefit from the (unhappy) results, if only to realize that this may be the time for switching to GlassFish...
Cargo is a versatile library that lets you manage, and deploy applications to, a variety of application servers. In this article, we look at how to use Cargo with Maven. If you are starting from scratch, you can use an Archetype to create a Cargo-enabled web application...
In the Forums, emiddio-verizon wonders how to keep generated jsp java files for debugging after deployment on gfv2.1: "i cannot find any class for java files for the deployed jsp pages for a web app in domains/domain1 -- anywhere; they used to appear in some earlier Sun App Servers in domain1/generated/j2ee-modules/jsp. how can i config the deployment to keep ..."
snovak7 is having migrating from v2.1 to v3 issues: "I tried my existing application to deploy on a glassfish v3, but have problems. Issue is in implementation of ServletContextListener I implemented, it uses getResourceAsStream, which works in v2.1, but not in v3, I just get NullPointerException 's. Example ..."
genericprodigy is Creating a Metro-based Secure Token Service: "I'm well aware of how to create a Secure Token Service (STS) using NetBeans, but what I am trying to accomplish is an IDE-independent method using Maven as the underlying project manager. I use NetBeans on a regular basis, and Eclipse on occasion, but I need to provide a method of creating a STS..."
Our current Spotlight is the Annual Developer Quiz put together by Janice Heiss: "For this quiz, SDN staff author Janice J. Heiss surveyed past interviews with leading Java developers in search of questions that might challenge, inform, entertain, amuse, and provoke you. The questions aspire to reflect both the intellectual curiosity and spirit of fun to be found in the Java community. We hope you enjoy taking this quiz... Test your knowledge of Java technology and computing..."
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.
Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.