The Artima Developer Community
Sponsored Link

Java Beyond the Browser: The Channel Metaphor
Marimba's Castanet Addresses Several Constraints of Java Applets
by Bill Venners
First Published in JavaWorld, December 1996

<<  Page 3 of 3


Channel issues
One consequence of the channel scheme is that it will normally use more disk space than a browser. With a browser the network becomes an extension of your computer's persistent storage. Applets are stored at servers, and you download them across the network each time you want to use them. This model implies that you are using the network to store your programs and data, instead of your local disk space, but requires that you wait for code and data to come across the network when you want to use them. For programs that take a long time to download, you may prefer to give up some local disk space in exchange for a reduction in time spent waiting for the download. The channel model consumes your local disk space to save your time.

One feature currently not available to Java channel developers is a mechanism for inter-channel communication, although Marimba may add one in the future. Currently all channels started by a tuner share the same Java Virtual Machine, a scheme Marimba may change in the future. Therefore, they also have left the issue of inter-channel communication to the future.

Other delivery metaphors
There are many companies currently promoting alternatives to Web browsing, the dominant model for information transmission on the Internet today. Web browsers "pull" information down from servers. Information is delivered across the network at the initiation of the client. Within this framework it is difficult for Web sites to attract visitors, and to ensure their return once they have visited. It is difficult for individuals to find Web sites of interest to them and to determine when a Web site may have changed enough to justify a return visit. New models, such as that provided by NETdelivery, PointCast, or Netscape Inbox-Direct, "push" information. Individuals subscribe to various sources of information, which are delivered across the network to their local disk at the initiation of the source.

Although the solutions provided by the delivery schemes overlap somewhat with Castanet, they are primarily aimed at solving a different problem. Most network delivery systems attempt to make it easier for sources of information to connect with the willing consumers of the information across a network. Castanet, on the other hand, is trying to make good on the original promise of Java by enabling automatic installation and updating of secure, robust, platform-independent software and content across a network.

WordSurfer: From Java applet to Castanet channel
It is easy to convert a Java applet into a Castanet channel. All you need to do, once you have a Castanet Transmitter running somewhere, is run a tool called the Castanet Putback. Putback will install your applet onto the transmitter you specify. (You must know the password to the transmitter, and your host needs to be on a charmed list of hosts allowed access to the transmitter.) You simply enter information about your channel into various edit boxes of the Putback user interface, and push the "Apply" and "Putback" buttons. The Putback program will send your channel's directory hierarchy up to the transmitter, and you're done.

The WordSurfer applet currently is being transmitted as a Castanet channel from JavaWorld. (It also appears in this HTML document for demonstration purposes.) This applet is a simple English vocabulary flash-card drill. I plan to change the words on the channel every Sunday, so each week we'll present another set of ten words to learn.

To subscribe to the WordSurfer channel, first download Marimba's tuner. (There is a link to the tuner download page at the bottom of this article.) Run the tuner, then click on the link below. You must wait for the initial download to complete before the channel will start. Look at the tuner to monitor the progress of the subscription and download.

You can no longer subscribe to and start the Artima WordSurfer channel

If the one-click method doesn't work, you can also subscribe via the several-click, multiple-keypress method. First, run the tuner. Select the tuner menubar item, then select New Channel from the drop down menu. Type in the edit box labeled Transmitter. Type Artima WordSurfer in the edit box labeled Channel. Then click Subscribe.

The WordSurfer applet demonstrates one kind of program that fits the channel metaphor. WordSurfer combines code with content, all of which can be delivered as files. The content will change more frequently than the code, but over time, the code will also change. The subscriber gets a service, in this case, a Java gizmo that exercises and hopefully boosts the subscriber's vocabulary. The subscriber doesn't worry about pulling down the latest version of the software or content. The program doesn't necessarily even have discrete version numbers that are known to the user. It just evolves over time.

Because the WordSurfer applet is small, it is practical to deliver it as an applet as well as a channel. It is shown below in applet form as a demonstration. Only the channel (not this applet) will be updated weekly, so if you want to become a weekly word surfer, you'll have to subscribe to the channel.

To use this applet, simply type in a word in the edit box in response to the prompt. If you answer correctly, the next card will be displayed. If you answer incorrectly, your answer will be highlighted so you can try again. To see the correct answer just hit Return in the edit box without typing anything. Clicking Random will cause the cards to be rearranged into a random order. Clicking Ordered will put them back in order. After all ten cards have been presented, the first card is shown again and the same drill repeats. Happy typing.


About the author
Bill Venners provides custom software development and consulting services in Silicon Valley under the name Artima Software Company. He has been object oriented for 5 years, primarily working in C++ on MS Windows. Before that he did a lot of C on UNIX and assembly language on various microprocessors. He is currently attempting to write the Great American Java Book. Reach Bill at

This article was first published under the name Java beyond the browser: The channel metaphor in JavaWorld, a division of Web Publishing, Inc., December 1996.

<<  Page 3 of 3

Sponsored Links

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use