Although the product name sounds like a Starbuck's-induced nightmare, Hewlett-Packard's Mobile Chai development suite is actually pretty dreamy. The Mobile ChaiVM is a super-optimized Java Virtual Machine with implementations for Dragonball (PalmOS devices), Windows32, Linux, SH3 (some PocketPC devices), and StrongArm (other PocketPC devices). Although IBM, Kada, Tao Group, and other vendors have created implementations of Personal Java for PocketPCs, this is the first time that Windows CE devices have been able to run MIDP. As for other devices, HP's implementation is one of the fastest -- and smallest -- available.
Mobile Chai is going to be integrated into the ROM of the upcoming HP Jornada 928 -- a GSM/GPRS phone and PDA in one -- as well as on HP's low-end printers such as the InkJet. And a version of the VM can easily be installed on most other devices.
At the core of HP's micro Java work is the nifty ChaiFreezeDry technology (told you the names were scary). ChaiFreezeDry compresses Java classes by as much as 50%. Boris Teksler, the Director of Marketing and Solutions at HP, gave me the lowdown. "Space is an extremely valuable resource on a device," Teksler said, "and being able to save on that saves a substantial amount of money." Saving space also makes programs download more quickly, run more efficiently, and start up faster.
Many JVMs use compression technology to save space. But decompression takes valuable time and eats up storage memory -- while a class is being decompressed two copies of that class must be in memory at once! ChaiFreezeDry focuses, instead, on concentration and pruning. Concentration involves reworking classes so that commonly repeated functions are broken out, creating as little redundancy as possible. Pruning is even more severe -- getting rid of extraneous classes and methods in the Java library that aren't being used -- allowing some classes to be reduced by 90%. "Our VM itself is concentrated and pruned," Teksler said, "which is why we have the leading size implementation."
To ChaiFreezeDry a class, a developer needs to run it through a special tool called "fdcon". This will then create a proprietary, pre-linked FD file. The VM loads and deals with the FD file at runtime. The freeze-drying can also be automated on a server so that devices with Mobile Chai can download FD files on-the-fly.