DBMS, January 1996
DBMS Online: C/S Developer By David S. Linthicum

The Client/Server Internet

Want to Leverage the Internet for Client/Server? Grab Some Hot Java and Get to Work.

The Internet is more than a passing technical fascination. It's an all-out explosion. It seems that everyone has Internet access in one form or another. Most (if not all) organizations larger than the corner hot dog stand have Web pages (including this magazine, at http://www.dbmsmag.com).

No, this is not another story about how the Internet is changing our lives. Instead, I look at how client/server developers can leverage the power of the Internet to build client/server applications for fun and profit. In particular, I explore how a new product from Sun Microsystems Computer Corp. (a unit of Sun Microsystems Inc., Mountain View, Calif.), called HotJava, could quickly become the best way to build client/server applications for the "Net."

Application Development for a Connected Market

The Internet is really nothing more than a public wide area network (WAN). Client/server development for the Internet is simply a matter of using the Internet for network transport in the same way you use your own private network. Numerous organizations use the Internet as an inexpensive and widely available WAN connection for their geographically dispersed clients.

For instance, I know of a small wholesale office-supply house that places order-entry applications built with PowerBuilder at each client site. The PowerBuilder applications communicate through the Internet (using a variety of Internet providers) to a database server that resides at the office-supply store's warehouse. Clients place orders for office supplies as they need them. You could accomplish the same thing with a private network, but the Internet is simply the "network of convenience" for many client/server applications.

The trouble with this public network model is that the clients must run proprietary front-end software to communicate with a proprietary server at the office-supply store. Moreover, there is virtually no security, and performance is lackluster, to say the least. This model also works adequately for businesses that know each other and can work closely together; however, businesses that want to reach a mass market of unknown clients will find that it does not work well because the potential clients don't have the front-end application.

Web browsers, such as Mosaic and Netscape, address this problem by enabling Internet users to access standard Hypertext Markup Language (HTML) documents from remote servers using standard transport protocols such as Hypertext Transmission Protocol (HTTP). There are thousands of businesses that have set up shop on the Internet using Web servers to communicate with the masses, including many that use HTML to communicate with database servers. (See "Database and the Internet," DBMS, December 1995, page 44.)

Using traditional Web browsers, users can view text and static pictures using HTML, as well as enter and look up data on more sophisticated Web servers using interactive Web server extensions such as CGI (Common Gateway Interface) protocol. However, the capabilities of HTML and CGI stop far short of what you would typically consider a fully functional client/server application. Client/server developers need a standard way to transport and execute free-form, platform-independent applications over the Internet, with the same ease and availability found in the traditional Web browsers.

Better Browsing with HotJava

HotJava (still in the alpha test stages at press time) builds on the Internet browsing technology of Mosaic and Netscape, and expands on their existing capabilities. Simply put, HotJava is more flexible than HTML. Developers can build Web applications with all of the functionality that they would expect from a traditional programming language such as C++.

The HotJava Browser (see Figure 1) is very similar to traditional Web browsers, but HotJava can execute "applets." Applets are platform-independent programs written in the Java Programming Language and embedded, like images, in HTML documents.

HotJava lets users access applications over the Internet in a whole new way. One of the most exciting features of HotJava is that the software moves transparently over the network from a remote server, with no installation required. When you need to run a HotJava applet, HotJava downloads it from a remote server (along with any other software your applet may require) and invokes it on your local workstation. For example, Figure 2 depicts a demonstration applet program. Here, the heads bounce quickly inside of an applet window running inside of the HotJava browser. Applets can execute without a continuous connection to a remote server on the Internet. And because Java is completely open, developers can build applets that can handle streaming data from the server, including video broadcasts, stock feeds, sound such as Real Audio, and so on. Developers can define the application, as well as the way the application communicates with other resources such as database servers, video servers, and audio servers.

The use of the HotJava program execution model means that content developers for the World Wide Web don't need to concern themselves with the fact that users may not have installed and configured a special piece of software required to view data. With HotJava, it happens automatically, as long as the user is running a browser that supports HotJava, or running the HotJava browser. This is browser-dependent technology. This transparent acquisition of applications lets developers move away from the limitation of the fixed media types such as images and text, and allows them to do anything they want, such as access information on a remote database server.

A New World

The basic difference between HotJava and traditional Web browsers is flexibility. Although other browsers have a lot of detailed, static knowledge of how to handle several different data types, protocols, and capabilities required to navigate the World Wide Web, HotJava is able to extend these capabilities through the use of applets. HotJava provides an open and extensible facility that lets developers add new capabilities to browsers on the fly.

HotJava applets provide this flexibility through interactive content, dynamic types, and dynamic protocols. Interactive content means that developers can create a Java application using the Java Programming Language, with the guarantee that others running HotJava can execute the application on any platform that supports HotJava. For example, a wayward Java applet cannot reformat your hard disk because Hot Java, the engine that runs the applets, won't allow it. This is very similar to the Telescript remote programming tool I wrote about last year ("A Better RPC," DBMS, June 1994, page 24). The Telescript agent had to have a local engine in order to run. The engine would not let the agent perform anything that would jeopardize the health of the local system. The same goes for applets. In addition, users know that HotJava applications contain no malicious code that can damage their systems. HotJava is ready for these sorts of tricks, and code that attempts to be malicious or just plain buggy can't get around the firewalls that HotJava places around its applets.

The use of dynamic types means that HotJava understands different types of objects immediately. For example, if someone creates a new image format, the developer simply places a copy of the Java code for reading the new image format on the server with the images. Other Web browsers would have to be updated to read the new image type, or users would have to download and configure software to read the new images. In contrast, HotJava upgrades itself on the fly to adapt to different data types. (The upgraded applet exists only in local memory while the applet is running. You can, however, save the applet to your local drive for future use. Most users will run an applet as it exists on a Web server, in the same way that they view an image or run a video clip.) The applications for this are endless, including reading various database formats, or connecting to a database server over the Internet.

Dynamic protocols mean that HotJava can incorporate new communications protocols dynamically to meet the needs of a Java application. This capability has the most significance for the client/server developer, because HotJava clients can dynamically receive a protocol and middleware information in support of an application. This enables HotJava applications, for example, to link to remote database servers.

A user running HotJava needs only invoke a Java client/server application, which in turn moves and executes the application code automatically, and also installs the custom protocol and middleware layers required for server connections. Many protocols and middleware layers may exist at one time.

Java Programming Language

The engine driving HotJava is the Java Programming Language, which is very similar to C++. Sun was planning on using C++ as the applet development language of choice, but it ran into some limitations with C++, and thus created a custom version designed for HotJava applet development. Sun describes it as a "simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high-performance, multithreaded, and dynamic language." From what I've seen, Java is an object-oriented programming language optimized for distributed heterogeneous applications. The applets are compiled into machine-independent bytecodes (similar to p-code), so that applets can move over the Internet and execute (using an interpreter) on any platform running HotJava.

The bytecode format (created using a compiler) is compact, which allows bytecode to move quickly over the Internet, and the Java Language compiler generates bytecodes for developers. Bytecodes are architecturally neutral, and therefore can run (using an interpreter) on a variety of CPU types, operating systems, and GUIs. You need only a Java runtime (part of HotJava) to interpret the bytecodes into native calls.

How do you begin to create Java applets? The HotJava Browser comes with complete Java Language API documentation. Sun is very eager to spread the word of Java, and provides a complete tutorial to create HotJava applets on the Internet (http://java.sun.com).

HotJava and the Java Programming Language are still very new products. It will take time before Java applets prove their viability in the mass market. However, products for the Internet have a way of getting around quickly. It's quite possible that HotJava Browsers, or Web Browsers that use HotJava's technology, could become commonplace in a few months.

I have to say that it's still too early to understand the real strengths and weaknesses of HotJava. Therefore, don't jump into HotJava with both feet until the product does some more evolving. Initially, the applets demonstrate only very simple applications.

Fully Caffeinated

As the Internet matures, those of us who want to use it to our best advantage will need a development deployment environment with the flexibility of HotJava. Although HTML has revolutionized the way we use the Internet, the limitations of HTML won't allow it to meet all our application development requirements. It's still very much a text and image system, and it was not really intended to be a true application development mechanism, even though many people are using it that way.

HotJava builds on the capabilities of HTML, allowing innovative developers to create platform-independent client/server applications for mass distribution over the Internet. As the Internet explosion continues, products such as HotJava will allow client/server developers to leverage the far-reaching power of the Internet. If you want to use the Internet to your best advantage, keep a close eye on HotJava.


* Sun Microsystems Computer Co. (a unit of Sun Microsystems Inc.), 2550 Garcia Ave., Mountain View, CA 94043-1100; 800-821-4643 (in California, 800-821-4642), 415-960-1300, or fax 415-969-9131.


FIGURE 1


--The HotJava Browser is able to execute Java applets found on the Internet.


FIGURE 2


--The Java "Bouncing Head Demo" applet demonstrates the flexibility of the Java language as heads bounce all over the screen. The HotJava browser does not have to maintain a connection with a remote server when running applets.


David S. Linthicum is a widely published author, speaker, and computer science professor, and technical manager with AT&T Solutions in Vienna, Virginia. You can email David at 70742.3165@compuserve.com, or visit his home page at http://ourworld.compuserve.com:80/homepages/D_Linthicum/.
Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
January 1996 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Sunday, December 1, 1996