An introduction to Waba -- an open source Java-like platform
By Rick Lehrbaum
2001-02-15
Article Rating:    / 5
| Rate This Article: |
Add This Article To: |
|
|
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 softwareThe 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 classesCurrently, 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 functionalityOne 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:
FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.
Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing¿s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.
Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn¿t leave you stranded in the dark. It¿s more than just a debugger, it¿s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that¿s positively illuminating.
Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.
High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.
Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.
Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.
Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG¿s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.
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. | |
|
|