March 26, 2002 -- If you managed to sit through the entire opening keynote address at the JavaOne Conference and Expo on Monday morning, you would have caught the first glimpse of a new demo from Sun -- the JavaNator. Avoiding the marketing talks that characterized the other speakers, James Gosling, reprising his role from previous JavaOne conferences, used his time on stage to demonstrate emerging technologies. One demo, JavaNator, highlighted real-time Java in embedded devices integrated with wireless Java phones in an end-to-end Web services architecture.

Real-time Java

Real-time Java is one of Gosling's areas of interest. Real-time systems are found in embedded applications as well as other applications that require a deterministic time behavior.

The Real-Time Specification for Java (RTSJ) holds the distinction of being the first Java Specification Request (JSR 1) of the 171 submitted to the Java Community Process (JCP) so far. But order of submission doesn't imply order of completion; although many other specifications have passed through the JCP, the RTSJ was just finalized in November 2001. Sun is not providing a reference implementation of the specification -- that task was delegated to TimeSys.

RTSJ includes such features as real-time threads, asynchronous events, interruptible nonblocking I/O (input/output), access to physical memory, scheduling, and timers. One of many Sun attempts to address embedded applications, RTSJ joins the ranks of aborted efforts such as EmbeddedJava, PersonalJava, and PicoJava as well as successful efforts such as J2ME (Java 2 Platform, Micro Edition). Whether RTSJ survives and where it will fit in with other Sun offerings remains to be seen. Past experiences in this area suggest that Sun has a tough hill to climb to succeed with RTSJ.

Although many companies offer real-time solutions for Java -- aJile Systems, esmertec, NewMonics, and Zucotto Wireless, for example -- none of these vendors support RTSJ in their products. In fact, most embedded VM and hardware vendors seem to focus most of their efforts on J2ME and have no plans to immediately jump on the real-time Java bandwagon. Since these companies already support some real-time capabilities, they see no compelling reason to immediately support the new RTSJ. Many are considering RTSJ support for the future (in the next 12-18 months), but most are waiting to see market demand before committing to this new API.

The exception is aJile Systems -- aJile participated in the RTSJ expert group and is currently working on an RTSJ implementation for its aJ-80 and aJ-100 chips.

Robot sumo

JavaNator presented a hands-on application designed to capture the imagination as well as emphasize the integration of several key Sun technologies, namely Web services, real-time Java, and wireless services. It was certainly the keynote's highlight and ended the session on a positive note. Simply put, JavaNator is a Java-powered robot.

The JavaNator demonstration started with Japan-class robot sumo. Robot sumo has been popular in Japan for many years, but within the past five years it has made significant headway in the US. Leading the popularization effort in this country is Bill Harrison, who incidentally designed and built the robot-driving base used by JavaNator.

Robot sumo follows rules resembling sumo wrestling. Two robots face each other in a circular arena, each attempting to force the other out of the ring. Unlike Battlebots and other popular television shows, robot sumo competitions are not violent -- intentionally trying to damage your opponent is expressly forbidden. Likewise, people don't control sumo robots. Instead, they rely on preprogrammed behaviors; software is just as important as hardware.

Robots in the Japan class have both a size and a weight restriction. They must fit in a box with a width and length of 20 centimeters (there is no height restriction), and must weigh no more than 3 kilograms.

JavaNator's opponent, termed JamesNator since James Gosling would drive it in the demo, is an identical robot without the autonomous behaviors -- Gosling would control it with a radio signal.

The audience could configure the JavaNator through Java-powered wireless phones, using Sun ONE (One Network Environment) Web services and wireless Ethernet. The audience could choose to emphasize speed or agility in a manner familiar to role-playing game enthusiasts by dividing 100 points between the two categories.

The robots can also broadcast video from on-board cameras -- although the video wasn't working in the keynote -- transmitted over wireless Ethernet for display to the audience. Since JavaNator is autonomous, all strategy and actions must be preprogrammed.

The technology underlying the demonstration is a mixture of the purely conventional and the Java-specific. On the conventional side, two direct current (DC) motors power JavaNator; each motor drives both wheels on one side of the four-wheeled vehicle in a differential steering configuration. JavaNator uses ultrasonic ranging detectors to discover opponents, and, to remain inside the sumo ring, two infrared photo reflectors under the front shovel detect the ring's white edge. The driving platform is custom-made.

The robots also prominently feature Java software and hardware. The CPU was Systronix's JStamp, powered by aJile's aJ-80 chip. The JStamp hardware was programmed to drive the robots' motors based on the sensors' input. An on-board Ethernet linked the JStamp with a video camera and was bridged to an iPlanet application server using an 802.11b wireless Ethernet over a Ubicom wireless bridge. The application server provided a Web-based interface for configuring the JavaNator and managed the real-time video output from the robots. The configuration interface is accessible via a MIDlet running on a J2ME-enabled cell phone.

The JavaNator and JamesNator

JavaNator faced JamesNator for two bouts on the stage -- Gosling drove his robot to victory in the first match, quickly pushing JavaNator out of the ring. However, JavaNator won the second match, leaving the contest a draw at one win each.

End to end

Perhaps the only unifying message to come out of the keynote was that Java can be applied end to end, from the database, through an application server, Web services, wireless connectivity, and down to J2ME/real-time Java interfacing to the real world, accommodating diverse clients, often with limited capabilities. A far cry from years past, when Java reached only the desktop, Java's end-to-end capabilities are due largely to Sun's efforts to incorporate the unifying technologies, such as XML, SOAP, J2ME, and wireless technologies. JavaNator demonstrates Java's end-to-end capabilities.

Coming soon to a city near you

If you left the keynote early, like most of the crowd that filled the huge exhibition hall, or if you are interested in learning more about the technology, you can still get a close-up view of JavaNator in the Moscone Center's South Hall Hacker Lounge, on the west side near the entrance. Sun also plans to take JavaNator on the road in coming months -- look for it at a robot competition near you.

Tim Rohaly has worked as a Java technology consultant, trainer, and speaker since shortly after the introduction of Java in 1995. He is an active participant in the Portland Area Robotics Society (PARTS), and designer of the PARTS Mark III Mini Sumo Robot Kit.

Learn more about this topic

Follow everything from JavaWorld