Skip to main content

I'm A Realist

Posted by editor on December 11, 2008 at 8:12 AM PST

You can get Java in how small a space? Really?

"I would like to see Java running on something that has 16K of flash memory and a few bytes of RAM."

Um... what? The average Java developer doesn't think twice about allocating buffers larger than that. A lot of Swing widgets have 32-bit ARGB back-buffers bigger than that. You're seriously going to fit meaningful code in that little space?

The quote is from Eric Arseneau, principal investigator on Project Squawk, which seeks to bring Java to small, resource-constrained devices. Eric explains his mission in the latest of Sun's series on Contrarian Minds, entitled Go Small or Not at All.

"People get excited about a couple billion cell phones. Well, there's an implied limit to cell phones. Most people only have one [...] I'm trying to go one or two orders of magnitude beyond that. I'm trying to get Java into the things that are all around you that you might not even realize have some kind of computer in there."

The article discusses Eric's re-orienting Squawk from delivering a micro JVM in Java to creating a Java "execution engine" that can live in small spaces. Or, perhaps, running many small things in some very big spaces, like multi-core servers:

"The fact that resources have gotten cheaper does not mean that you have to use them up. The fact that they've gotten cheaper means you can do more. It doesn't mean you have to be lazier about creating your applications and not worrying about resources. You should still worry about them. Maybe not as much as you would in a resource-constrained environment, but you should think about these things -- and people don't anymore. [...] One of the purposes of a big server is to run as many processes as possible. Well, if you want to run many processes on a CPU, you need to take extreme care about how many resources you take up. The more resources you take up, the less processes you're going to be able to run on a single machine. But people have lost that mentality. They just assume that because they've got gigabytes and gigabytes of RAM, they never have to worry about it. It's turns out that's not quite true."

Could resource-sensitive ME-and-smaller developers make better enterprise developers? It's a remarkable hypothesis. What do you think? Post a comment and let us know.

Also in Java Today,
Vita Santrucek's blog offers a peek at Java 6 update 12 and notes major features planned for the release, including a 64-bit plugin, lightweight/heavyweight mixing, Windows Server 2008 support. "Now the best part - all of these features have already been integrated in the early access builds. You can check the latest (b02) one out on the portal, or directly at the download page - The plan is to publish all builds until the GA (General Availability) release, so check back often for new builds."

A new patch for the NetBeans IDE 6.5 is now available on the Update Center. The patch includes fixes in modules for Auto Update Services, Ant, BlueJ Project Support, C/C++, Database, GUI Builder, GlassFish v3 Prelude, GlassFish v3 Prelude - JRuby, IDE Platform, Java, Java EE, Web Applications, Java Profiler, NetBeans 6.5, PHP, Platform, RESTful Web Services, Ruby and Rails, SaaS Services Support and UML. More information on the 62 fixed issues is avaialble on the NetBeans 6.5 Patches Info wiki page.

In today's Weblogs Alexey Ushakov introduces
JWebPane project, a browser plugin for Swing and soon FX. "I'm the tech lead of the new JWebPane project, a browser plugin for Swing and soon FX. We showed a preview this past JavaOne that was well received, and I wanted to give everyone an update on where we are."

In his first blog, Sourath Roy explains
Java SDK for TV, offering a "discussion on available SDKs for developing Java applications for TV. Talk on the upcoming ones from Sun Microsystems."

Finally, Rajiv Mordani explores
Asynchronous support in Servlet 3.0. "After the last couple of entries I have gotten requests for more details on how the async works. So I decided to write this up in a blog to share what the async support looks like in the Servlet 3.0..."

Today's Forums begin with a
Request for comments on "dynamic reconfiguration" from Fabian Ritzmann. "I would like to solicit your feedback/comments on a one-pager document describing a new feature for Metro 2.0: DynamicReconfigurationOnePager. Please note that the review period is 1 week. Comments received after that may not be considered for the Metro 2.0 release."

tmjkeeney doesn't get
Clustered Timer Service Behavior in GlassFish. "I've read that EJB timers can be clustered in Glassfish by configuring a central database for the timer state; however, it is not clear to me how the timer service behaves in a cluster. Does the timer service run only on a single "master" node in the cluster such that the timer callbacks are executed on 1 cluster instance only, or is the timer service distributed such that callbacks are balanced across nodes in the cluster? Either way, I assume a timer expiration only occurs once across the cluster so we don't have the same timer callback invoked more than once across the cluster, right?"

Fabian Ritzmann explains how to opt out of unnecessary transaction support in
Re: Web Service Client and Server unable to communicated over separate boxes. "EJBs by default have the transaction attribute set to REQUIRED. The web service code is picking that up and adding the transaction context to the SOAP message. You can disable transaction support by setting the transaction attribute e.g. to NOT_SUPPORTED. See here for more on transaction attributes."

Finally, Shai Almog reiterates care and feeding of LWUIT's event-dispatch thread in
Re: How to use a Dialog as a "Now loading" screen? "If your call is on the EDT and you don't have a transition there will be no problem since show() should be synchronous on the EDT. If you are not on the EDT you can just loop and wait for Display.getInstance().getCurrent() instanceof Dialog."

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

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 it will be
archived along with other past issues in the href=""> Archive.

You can get Java in how small a space? Really?


I've been saying for nearly a decade that programmers would be better at it if they knew about things like memory structures and allocation, even better if they knew something about what machine code their code results in.

I took a year of x86 assembler in university, and despite never using the language afterwards it taught me a lot about how computers work and how code behaves. Now, I can hear people screaming about premature optimisation being bad and it can be, but keeping memory and CPU use in mind when deciding on data and code structures helps you build efficient software.