Future of Java Embedded VMs

I’m writing about this topic based on a request made by Artur Lojewski back in November last year, it has taken me a while to collect my thoughts on this topic as well as find time to sit down and write a posting.  Artur attended Eclipse Summit Europe where Dave Thomas (Big Dave) gave a talk entitled “Next Generation Embedded Software – The Imperative is Agility!” and asked what my opinion was.

Unfortunately I didn’t attend that Eclipse Summit Europe, so I didn’t hear what Dave had to say.  Talking to some folk that I do know who went – their impression was “Vintage Dave“.  I have made reference to this in the past – but I did work for Object Technology International and my university education was heavily influenced by Dave Thomas – myself and my classmates were some of the first to work our way through learning datastructures etc., in Smalltalk.  So a lot of my opinions of what Dave says are going to be coloured by my past experience (and his influence on the start of my career).

Almost any talk given by Dave will get people to sit back and think – he’s also not afraid to stand in front of an audience full of Java programmers and tell them that they’ve picked the wrong language.  In my experience he always has some good points and is worth listening to, but to interpret his talks as a set of black and white statements (or out of context) is dangerous.  There were two other bloggers that gave some in person accounts of his talk – I’d encourage you to read those.  Another reasonable reference is to read about Dave’s thoughts on JavaScript – and if you go back to what got Java started (the browser plug-in) and where Java is today, it is clear that the language didn’t fulfill the original promise.

There are others who are predicting that embedded java is dead, even James Gosling has suggested that J2ME is done.  However, if we take a look at embedded Java today – you’ll see that the Blu-ray format is a new niche for this technology.  As well, even low cost phones such as the Nokia 2760 support the J2ME profile.  This means that as a platform, there are actually billions of devices out there – how is this not success?

I think it depends on what the original goals were, and the future of the platform.  Among the various J2ME enabled devices, there are differences.  This isn’t really a lot better in the browser / javascript space, but Web2.0 holds the spotlight at the moment.  Probably the biggest threat to the J2ME space is the new generation of smart phones:  iPhone, G1 and Palm Pre – none of these have embraced Java as the path forward.

Looking at embedded hardware, we’re starting to see more and more capable hardware in the palm of your hand.  For example – iPhone is a 400MHz ARM cpu compare this to a hot desktop circa 1998 (PentiumII 400MHz), the very definition of what embedded means is changing.  In the near term J2ME will continue to be an expected feature in cell phones, so there is still a market which will continue for several (5?) years.  As the smart phone market sorts itself out we’ll see which new (or old) technology rises to the top.  It is probably safe to say that J2ME will have an impact on the outcome,  but to bet on it as the winner is probably long odds.

Disclaimer: The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.

64bit Follow-up

The decision to start including work related items in my blog certainly had a dramatic impact.

Hopefully I’m not a one hit wonder and will never say anthing relevant (or at least link worthy) again.  I remain open to suggestions for content, so if you have questions you think I might be able to answer contact information is available on my About page.

The spike was generated by my posting about 64bit java performance, and this post is a follow up to provide a bit more data on some areas I touched on.

There is some more data on the Sun JDK implementation on the HotSpot wiki.  Based on the recent publish of some SpecJBB2005 results, it seems there is (or will be) a supported version of compressed pointers from Sun.

Of course, the careful observer may noticed that the results are from an x86 based platform.  Does compressed pointer technology only matter on x86 based platforms?  In my original posting I focused on the x86-64 architecture and the benefits (and pitfalls) it brought to applications.  In brief, by moving to 64bits the gain was both bigger and more registers.  If we look at Sparc or POWER CPUs – these were both created with an eye on 64bit implementations, and thus the move to 64bits had less of an impact on the instruction set or register width.  This means that for these systems, 64bit support results in more data (due to pointer size doubling) to move without any real benefit in terms of instruction set (read: code optimization).

Currently I believe Sun has only implemented their compressed pointer solution on x86-64 systems.  There is no strong technical reason preventing it from being done on a Sparc system, but as I pointed out above the benefit may be harder to realize.  The IBM Java6 JDK supports compressed pointers on POWER (AIX/Linux) and there is a measurable improvement on memory intensive benchmarks.  IBM also supports this feature on zSeries (yup, the mainframe) and the following graph shows how the 64bit environment nearly matches the performance of the 31bit environment under Linux.

The -Xlp option is used to configure the IBM JDK to use ‘large pages’ to allocate the heap.  The details about large page support I’ll save for a future posting.   

So while most of the excitement around Java performance on 64bit systems is focused on x86-64, it is worth considering on other architectures.   I believe this will become more important as java applications continue to grow and start hitting the limits of the 32bit address space, forcing a move to 64bit.

Roo in Japan

I was in Japan last week for business.  While we had been talking about the possibility of going for a while, I found out less than 24hrs before getting on a plane (Jenn was very understanding).  This was my first time across the Pacific Ocean, and with a 14hr leg (single flight) in my trip, I set a new personal record for being stuck on a plance (in economy no less).  The time delta was 14hrs meaning that at 7am in Japan, it was 5pm the previous day at home.

I was staying in Tokyo, near Shinjuku at the Hyatt Regency.  It turns out this was very close to the Park Hyatt that was featured in the movie Lost in Translation (which if you haven’t seen, is a good movie).  The Hyatt was a nice hotel, certainly meeting western standards for space.

Since I was there for business, I was a little concerned about making the right first impression.  I found a few links that helped me not feel like a total idiot.  Generally the Japanese people feel very polite, the bowing really struck me.  The general care they take presenting you with a bill is quite nice, it is done similar to the business card exchange which is very ritualized.

Thankfully, the company we were visiting is a little less traditional and tends to style itself after a Silicon Valley business.  One thing that I would try to do for another trip is make sure I have a few small token gifts from Canada to share with my hosts.

Since the employees of the company were Japanese, we were using a translator.  While some of them did speak English, there was a varying level of abilty with the language.  Since I don’t speak any Japanese the translator was a huge help.  Anyone who has head me speak knows how quickly I can go – this won’t work with a translator.  It took some getting used to, breaking ideas down into short snippets that could be translated without losing any of the technical content (just because they don’t speak the same language, doesn’t make them simpletons).

On day 3 I noticed that the translator was fixing my errors in naming folk by adding -san,  and I was honoured to hear Andrew-san a number of times.  I’ll go out on a limb a little here as I don’t know, but it also seemed to take a little time to break down some of the trust barriers – this may be a cultural issue, or just the standard technical problem of everyone is an idiot until proven otherwise.  By the afternoon of the 3rd day we were all jamming at the whiteboard discussing issues, and it was clear that there was understanding (both ways) even without translation.

We had dinners out as a group (without the translator) and there were enough folks with both English and Japanese on both the customer and IBM side to help things go smoothly enough, they were also especially helpful in instructing us how to eat dinner as many of the dishes were unfamiliar.  We ate in restaurants with low tables but with a cut-out below for your legs, we also removed our shoes before entering the eating area.  While the food was unfamiliar, it was all good. My best guess after the fact is that the meal was ichijū-sansai style.  The soup was cooked at the table and I couldn’t help but compare it to a DIY meal such as fajitas (which I always want a discount on as I’m doing part of the worK).

It was cool to see that Bunnie was in Japan at the same time, and blogging about both food and some of the neat things to see in Japan.  Unfortunately I didn’t have time to explore some of the things he talked about, but it did help me get my head around the culture a little more.  In the little time I did have free, I did a little souvenier shopping – while I could navigate the subway and the stores, the language barrier was significant. Unfortunately I didn’t manage to find a 100 yen shop (dollar store), but did explore a few of the 10+ story department stores.  I ended up buying a few things at a shop on the 45th floor of the Tokyo Metropolitan Government Offices  which gives an amazing view of the city.  In the elevator ride down it was a pretty tight right with about 8 other people, but none of them were above the level of my shoulder – Japan isn’t built for people who are 6 feet tall.

I had been told that McDonald’s was “the same, but not the same – you have to try it”.  The menu certainly had some unfamiliar selections on it such as Ebi Filet-O (shrimp burgers).  When I got to the airport the food selection was pretty limited but there was a McDonald’s so I figured why not?  The double Big-Mac and fries, tasted the same (or possibly better) than the ones I’m used to.  I did also eat out of one of the ubiquitous vending machines, the ice cream was very good.

While I was there the weather was mostly overcast, but around 10C to 15C.  During the day I’d forego having a jacket which made me stand out in crowds.  Generally the Japanese were bundled up in jackets as it was considered “cold”, but as I was primarily in the office (24C), subways and stores I found it hot if I had a jacket on.  It did cool off in the evenings, and many of the commuters had very long trips (1hr+) which might have required more variation in clothing.  In the evenings I did wear a jacket, I’m Canadian – not crazy.

It was a good trip, but I’m really glad to not be on a plane and staying close to home for a while.