[Simson Garfinkel -
Tech]



[Packet]
Japanese Java 
      Jive

A Japanese Web site proves that Java can walk the walk

If you want to see the real promise of Java and are tired of the hype, then just take a look at World Fiction, a tour de Java-force developed by the Art Technology Group, a five-year-old spinoff from the MIT Media Lab.

Based in Japan as part of Nippon Telegraph and Telephone's new Internet presence, World Fiction is something of a cross between a MUD, a series of chat rooms, and an interactive story. You start off by creating your World Fiction character. You tell the system critical information such as your name, age, astrological sign, and blood type. Then the system lets you pick an avatar from a data bank of clip art. Once that's done, you can click your way into a room where an interactive story is taking place.

The stories are created by other World Fiction users. A sophisticated editing system lets you build new rooms, put objects into those rooms, and create scripts that execute when rooms are entered or when people's avatars are clicked on. If you click into a room and there is somebody else present, you can "talk" to them by typing the words into a text field at the bottom of the Web page. Your words appear in thought balloons over your character. Punctuation at the end of your sentence is interpreted by the system and affects the way the balloons are drawn.

World Fiction's
rooms are
drawn locally
by the
Java applet.
Once it is
downloaded,
only updates
are sent over
the wire, and
they're tiny.

The whole environment is controlled by a 150-Kbyte Java applet that runs in your Web browser. The applet communicates with the World Fiction server using a messaging system designed by ATG that wraps messages inside HTTP Post requests. This lets World Fiction run through corporate firewalls - even those fancy proxy-based systems that never allow you to create a clear connection between the server and the client. It also makes World Fiction run really fast - even if you're in the American hinterlands, connecting over a 28.8-Kbps modem to the server in Japan. That's because World Fiction's rooms are drawn locally by the Java applet. Once it is downloaded, only updates are sent over the wire, and they're tiny.





Is Java all
hype or is it
the Holy Grail?

Speak up in Threads.

The latest
post to Tech is
""
by
()



Subscribe to
PacketFlash,
for Packet news.

Don't like your avatar? Click "edit" and World Fiction will download a paint tool into your browser. You can even create a full-blown animation, so that your avatar can shake its head or wink when people click on it. You can also have your avatar play sounds.

World Fiction's closed authoring environment solves a lot of technical problems with Web-based environments, says ATG's creative director Christopher Edwards. Because users can edit their avatars only with the system's paint tool, you don't have to worry about users uploading images that are corrupt, or that are anti-aliased for the wrong background. The paint tool restricts users to just a few colors, so the images compress like crazy. A tiny Photoshop written in Java, the image editor automatically uploads your GIF to World Fiction when you're done; no cumbersome FTP-ing.

But World Fiction's real Java action isn't in the browser; it's over on the NTT server in Japan. World Fiction is written with Dynamo, ATG's sophisticated environment for writing Web-based applications.

[switch on]With Dynamo, you write Web pages in a combination of HTML and Java. When a Web client tries to fetch a page, the Dynamo server translates the entire page into a Java program, which it stores in an object-oriented database. The server then runs the program, and the HTML streams over the Net connection and into the user's browser.

Other parts of the Dynamo system automatically track users' sessions as they click through your Web site. The system allows you to build per-user data structures that can be accessed from any page on the server. This makes it easy to build things like shopping carts, or to personalize Web pages to meet the needs of different users. Dynamo communicates with your Web server through the Netscape or Microsoft API; the company is working on an Apache module. The actual tracking is done with cookies or, for folks using antiquated browsers, with automatically generated URLs that are rewritten for every user.

"We basically bet the company on Java," says Joe Chung, the company's chief technology officer.

Today that's not a radical statement, but back in January things weren't so clear. Back then, ATG had just finished Dynamo 1.0 - a system that provided much of the same functionality of today's Dynamo, but was written in C++ on the server and used Scheme as an extension language on the Web pages.

"Developing in two languages sucks," says Chung. On the other hand, ATG had just signed more than US$3 million in contracts with various clients to deliver working Web sites using Dynamo 1.0. None of those contracts included the extra two-to-three months which the team thought would be required to translate their 100,000-line C++ system into Java.

Things went much faster than expected. After making the decision over beers one Friday night, Joe and his team spent the weekend hacking and had a skeletal system working on the following Monday. It turned out that nearly half of the functionality in the original C++ program was already built in to the Java language. Then there were the added benefits that come from being able to correct all of your mistakes, rather than having to work around them.

So take a look at World Fiction, and while you're at it, click into Stream, another site built with the Dynamo engine. But don't expect the icon editor and the other super-cool client-side Java stuff to work on a Macintosh - especially if you're using a Mac that hasn't been upgraded to PowerPC. Although a lot of people once thought that Java, because it was open-platform, could help give the Mac a fighting chance, lately it's been doing the opposite. I'll talk about that next week.

[Simson Garfinkel]

Talk back to Simson Garfinkel in his column's Threads.

Illustration by Dave Plunkert


Join the HotWired Network, it's free. Members log in.
[to webmonkey] [to netsurf central]

Previously in Garfinkel ...

Previously in Boutin ...

 

Wired News | Wired Magazine | HotWired | Webmonkey
RGB Gallery | Animation Express | Webmonkey Guides | Suck.com

Work at Wired Digital | Advertise with us | About Wired Digital | Our Privacy Policy

Copyright © 1994-99 Wired Digital Inc. All rights reserved.