Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum

Keywords: Match:
An introduction to Waba -- an open source Java-like platform
Pascal Bauermeister, Olivier Bornet     (Feb. 15, 2001)

Waba is a programming platform for small devices. Waba defines a language, a virtual machine (VM), a class file format, and a set of foundation classes. Legally speaking, Waba is not Java. Also, the foundation classes are simplified in comparison to the standard Java classes, and the VM has certain limitations. Other than this, a programmer familiar with Java will be able to write Waba applications immediately, using the usual development tools. Waba is currently gaining popularity among programmers, and a Linux port is in process.

What makes Waba special?
  • Waba is well suited for embedded and mobile devices, as well as embedded PCs (OS on one floppy)
  • Waba is free and open source (released under the GNU GPL)
  • Applications written in Waba can be run everywhere a JVM is available.
  • The VM is written in standard ANSI C
  • The VM takes 40KB of executable code on Motorola 68K processors, and about double that on a Pentium
  • It is probably the fastest VM able to run bytecode, hence very interesting for embedded systems with low-cost, low-end CPUs
  • It can run standard byte code encoded in its standard format (the class file), produced by any Java compiler
  • It has a no-frills, deterministic garbage collector
A more extensive description can be found here. Where does it come from and where will it go?

Waba was developed by Rick Wild of Wabasoft, initially for PalmOS -- principally to provide programmers with a layer hiding the instabilities of PalmOS (especially regarding low memory). Wild then ported Waba to Windows and PocketPC.

Many people contributed to extend the foundation classes and also the VM, mainly with PalmOS in mind. SuperWaba was born and is the subject of an active community of developers.

Then, Smartdata decided to adopt this VM for its ChipSlice platform running the popular embedded version of Linux for MMU-less processors named uClinux and launched the Linux/uClinux Waba port. Noticing the need to synchronize the development, Smartdata opened a SourceForge Waba project.

Waba is likely to become increasingly popular as an application platform in applications such as PDAs, cell phones, and embedded PCs. It should also prove useful for more specialized tasks such as portable drivers or as a scripting language. It is a serious competitor to Sun's J2ME (KVM), but with the advantage of being completely free. Relative to Kaffe, it takes an opposite approach -- that is, starting small and growing, instead of starting from a quite complex VM and having to reduce it.

Supported platforms
  • PalmOS -- available
  • PocketPC -- available
  • Linux -- port almost finished, available for GTK
  • uClinux -- SourceForge project in progress for PicoGUI
Where to find Waba?

A list of useful links are available here.

Organization of the Waba VM software

The VM code is structured so as to ease porting onto different platforms, and is organized as follows . . .
  • the VM core, platform-independent
  • the OS abstraction routines, interfacing the core to the OS, include:
    • the class loader
    • the startup and exit functions
    • the file manipulations
    • the windowing, sound, networking, etc. functions
  • the C implementation of the native routines, called by the core Java classes (themselves written in Java)
The foundation classes

Currently, the foundation classes are . . .
  • fx: simple effects
    Color, Font, FontMetrics, Graphics, ISurface, Image, Rect, Sound, SoundClip
  • io: access to IO resources -- Catalog, File, SerialPort, Socket, Stream
  • lang: subset of the standard lang package -- Object, String, StringBuffer
  • sys: misc system utils -- Convert, Time
  • ui: simple widget-oriented GUI without layout manager -- Check, Container, Control, ControlEvent, Edit, Event, IKeys, KeyEvent, Label, MainWindow, PenEvent, Radio, Tab, TabBar, Timer, Welcome, Window
  • util: misc utilities -- Vector
This quite spartan environment enables an extremely reduced footprint, yet it is rich enough to enable writing interactive applications on a PDA (e.g. Palm). Many classes, though slightly different, resemble standard Java core classes but are actually much simpler. Some other classes, like the io.Catalog, were designed to exploit specifics of PalmOS and do not really have an equivalent in standard Java. Discussions will take place within the community regarding moving towards more standard APIs (like, for instance, a subset of the AWT) but without losing the advantage of reduced footprint.

Extending the functionality

One can extend Waba's functionality by supplying additional Java classes, which is probably the easiest way. However, as soon as OS resources (other than those already supported by the existing foundation classes) must be accessed, or speed is an issue, the answer is to implement a package including native methods.

How to implement a native package?

It's rather simple . . .
  • Choose what to implement in Java, and what to implement in C
  • In the Java source code, write the class, including members and methods
    • the native methods must be declared as such
    • the other Java methods may, of course, call the native ones
  • Write the native methods in C; there are a few conventions on how the method gets its parameter and object reference; the method may create other objects (especially strings)
  • Register the native method in a Hash table in the VM; there is currently no dynamic binding such as JNI
  • Declare the class' memory requirement for non-Java members (allocations done by the C code)
  • If needed, Implement the class' destructor


About the authors: Pascal Bauermeister is head of software development at Smartdata in Lausanne, Switzerland, which launched the SourceForge Waba Project. Olivier Bornet also works for Smartdata and is the admin of the SourceForge Waba Project.



Related stories:

(Click here for further information)


7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.

Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.

Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.

Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.

Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.

Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.

Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.

Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
GOLD SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Check out the latest Linux powered...

mobile phones!

other cool
gadgets
HOWTOs: from DevShed & IBM DeveloperWorks:



BREAKING NEWS

• Balanced XIP and the AXFS filesystem
• ARM-based controller has StackableUSB expansion
• Multi-protocol wireless mesh gateway runs Debian
• Embedded Linux is doomed. DOOOMED!
• Article explores Linux hot-patching utility
• Sun demo's RIA tools on Android
• Panel PCs support PoE, Linux
• New Palms on horizon?
• Embedded track added to Linux conference
• Ubuntu ported to a PDA
• Linux-friendly SBC hosts dual quad-core Xeons
• Embedded Linux SQL database adds Java, C# bindings
• Lightweight, embedded graphics framework rev'd
• Shock resistant automation computer runs Linux
• Linux phone maker updates tools


Most popular stories -- past 30 days:
• Ubuntu ported to ARM
• Linux still top embedded OS
• Linux gains new architecture support
• Linux 2.6.25 release bolsters ARM
• Linux-based diskless notebook costs under $300
• Low-cost MP3 player gains fancy Linux port
• Dutch UMPC runs Ubuntu Linux
• Mini-notebook boasts Linux, near-fullsize keyboard
• PC/104 module runs x86 Linux on 1.85 Watts
• Low-cost Linux-based NAS device supports RAID 1
• Free router distro gains wild WiFi features


Linux-Watch headlines:
• Running a small business on desktop Linux
• Sun launches OpenSolaris
• Via tiptoes toward openness
• Linux certification comes to Italy
• Installing Ubuntu Hardy Heron as a web hosting server
• Black Duck Buys Koders
• Open source conference co-locates with Ubuntu show
• Ubuntu 8.04 ready to challenge Windows
• KDE Linux reaches 52 million Brazilian kids
• Free x86-based Linux router distro rev'd


Also visit our sister site:


Sign up for LinuxDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  About  |  Contact
 
Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Linux is a registered trademark of Linus Torvalds. All other marks are the property of their respective owners.