Net Explorer and O Store: With Netscape Application Server, a High-Volume E-Commerce Site is Built in Eight Weeks

By Caroline Rose
February 1999

In developing web-based applications for its customers, Net Explorer, Inc. found the need to move to the multitiered architecture offered by a web application server. Their server of choice was Netscape Application Server (NAS), which proved so successful that they were able to develop a sophisticated e-commerce site, the Oakley O Store, in only eight weeks. Here we'll review why Net Explorer chose NAS and how they built the O Store in true "Internet time" on this foundation.

This article doesn't go into a lot of detail about the application server architecture. For more on the basics of a multitiered architecture, and NAS in particular, see the View Source article "Netscape Application Server: A Server-Side Developer's Perspective."


THE CHALLENGE

Net Explorer is in the business of providing web-based access to their customers' business processes and legacy IT systems; they offer consulting services for everything from requirements gathering to development and support of these web-based systems. The traditional client/server architecture doesn't work for such systems (in which the clients are browsers that communicate via HTML) because HTML isn't capable of the kind of logic processing that's necessary on the client. Although it is possible to force some logic processing into an HTML client by using special extensions such as embedded Java applets, this kind of processing tends to be very inefficient, since it requires a lot of data to be passed back and forth between the browser and the server.

Furthermore, as Net Explorer began to develop web-based systems, they discovered a core set of "application services" that they had to develop in all their intranet and Internet software. These services include:

  • session management - tracking the user's session
  • dynamic load balancing - redistributing the load across multiple servers
  • pooled database connectivity - managing a small set of connections to the relational database so that they can be shared by a large number of users
  • object management - communication between objects through IPC; object life cycle management (when to instantiate or delete objects); and object updating and redeployment

Because these services aren't commonly used in traditional client/server applications, there's little support for them in most software development tools. It proved very expensive for Net Explorer to develop these services inhouse, integrate them into all their web-based applications, and update and maintain the code base for them in all their software. Net Explorer's developers found themselves programming to low-level APIs and pondering the complex ramifications of allowing concurrent access to a server's CPU and data storage systems; they would have preferred to develop to higher-level, standard APIs (such as those supported by Enterprise JavaBeans and NAS AppLogics) and to focus on defining and implementing their customers' business rules and requirements.


THE APPLICATION SERVER SOLUTION

The solution for Net Explorer was to move from the traditional client/server architecture to a multitiered architecture, which doesn't depend on the client for any processing power (hence the term "thin client"): the application actually runs on the server. Using an application server would free Net Explorer's developers from having to code the basic application services. In assessing the application server solutions that were available - and finally choosing NAS - they looked at both the development and the deployment environments.


The NAS Development Environment

Corby Page, Net Explorer's manager of engineering, notes that NAS is especially strong in the following development areas:

  • Developing HTML interfaces via templates - With NAS's HTML template capabilities, the customer's user interface designers can simply turn over HTML designs showing what they want the interface to look like, and the engineers can easily figure out how to implement it. Net Explorer was surprised at how weak the other application servers' offerings were in this area when compared to NAS.

  • Handling session management - One way that developers can track users through their applications is with client cookies, but cookies can get lost; for example, they disappear if the user switches browsers. NAS has a clean API for obtaining session information (enabling you to get attributes of the user at any time) and offers a reliable, sound architecture for session management.

  • Caching - NAS's excellent support of caching gives it significant performance advantages over other application servers. Frequently computed results do not have to be recalculated, which is a rare feature in other server product offerings. NAS also offers a fine level of control over caching; again, Net Explorer found that other products simply didn't compare.


The NAS Deployment Environment

Corby believes that for complex applications, the deployment environment is even more important than the development environment, because "once the application is up, it's got to be rock solid." He says that NAS's deployment environment was "more exciting to a consultant -- really key" in their decision to choose NAS. While some application server vendors have spent a lot of time on the development environment but not on deployment, NAS has a very strong story to tell on the deployment side, particularly in the following areas:

  • Load balancing - To handle increased load, you can add servers on the fly and redistribute the load while the application continues to run. With other server solutions there's often only the option of "getting a bigger box," or, if they do offer load balancing, they're not as intelligent in their choice of where to redirect the load. Load balancing is important for high-volume applications. The rule of thumb for most Java Virtual Machines (with the notable exception of the AIX VM) is that once you have 500 users doing transactions that access the server during the same 30-second period, you need to add another application server.

  • Real-time monitoring - NAS offers powerful tools for administering and monitoring application services. These tools provide a unifying interface that combines all aspects of a web-based application into a single window, rather than requiring the various services to be dealt with separately.

  • Dynamically reconfiguring your application - You can take new or updated code modules and deploy them with the touch of a button, making them instantly be part of the application without having to take anything offline, so there's no down time. (Compare this with a traditional client/server application, where the new version of the application must be installed on every client that wants to run it, and where a version mismatch between the client and server can be catastrophic.)


SUMMING UP NAS

Net Explorer found that the web applications they developed using NAS could easily scale up in transactions made (thanks to a responsive engine and load balancing) and in complexity. Scaling up in complexity can mean, for example, adding access to legacy systems or granting read/write (as opposed to read-only) database access to users. Also, complexity increases as business rules grow more complicated and difficult to implement, and as corporations add new rules. NAS simplifies development by allowing reuse of old code, and deployment by making it easy to upgrade with new code. By comparison, Corby Page says that many current high-availability, high-volume sites are running on "spaghetti code."

With NAS, Net Explorer could build web-based applications at a lower cost than was possible with the web-development tools that predated application servers. Although the initial purchase price for NAS is high, development costs are lower, mainly because of the advantages of having an object-oriented environment (including reusable code). Also, an application built using NAS is less expensive to maintain: you can basically set it up and not have to worry about it. If you need to change it in the future, you can add new components and servers without having to take down or alter what's already there. You can easily update the application logic (or modify the user interface through HTML), try out the updates on a test system, and, if they work, deploy them to your actual system on the fly.

Net Explorer did encounter some problems with NAS, including one that Corby describes as "discordance": whereas NAS's deployment environment is well suited to sophisticated, high-volume web applications, its development environment is best for building simpler, smaller-scale applications, which can't fully exploit the deployment features that NAS offers. This caused Net Explorer to come up with a modified NAS architecture called object pooling (for details, see the article "Object Pooling in NAS: An Architecture for Caching Objects"). Tools like Netscape Application Builder (NAB) 3.0 will improve this situation, and support for Enterprise JavaBeans (which is coming in the next version of NAS, due early 1999) will solve the problem.


CASE IN POINT - THE OAKLEY O STORE

Oakley, Inc.'s O Store is an e-commerce site from which customers can purchase athletic footwear, sunglass lenses, and other products. In developing this site, Net Explorer had a very ambitious goal: to build a complex, high-volume web application on a very tight schedule, with only eight weeks for development. The application was sophisticated, would have lots of traffic, and needed rapid turnaround. NAS was clearly the right solution.

Preceding the development phase of the project, the Net Explorer team spent a lot of time (over a period of two weeks) in design sessions onsite at Oakley. They learned and established business requirements for the O Store and set up business rules for handling things like sales tax, shipping, international sales, client tracking, and default quantities for ordering. The object model they used came from these sessions (where they also tried to poke holes in the business logic to be sure it all made sense).

For the user interface, Oakley provided the overall "look and feel," which they wanted to carry over from previous product packaging and from their existing web site. In fact, one of the challenges was that some graphics (such as those for the online catalog) weren't ready yet, and a modular design was required so that the graphics could be plugged in later when provided by Oakley. Net Explorer developed the components that delivered the user interface. NAS's HTML template system enabled a very clean handoff from the Oakley interface designers to Net Explorer's developers: they could deliver their own mocked-up HTML designs, and Net Explorer's developers could add markup tags that would allow these pages to serve as NAS interface templates.

Net Explorer also developed the persistence components - the code that loads or stores data from back-end systems external to NAS - including the component that interacts with the Oracle database. Oakley uses an SAP system for order fulfillment; the information about an order is stored in a flat file, which is then read by the SAP system.

The eight-week development schedule was easily met, due in large part to Net Explorer's earlier experience working with NAS. They had previously built an internal system on NAS to help do project tracking, and all their engineers had contributed to it as a way of getting up to speed on NAS. The object model for the Oakley project had already been set up (during the earlier design sessions), and the modular architecture that was chosen was critical for getting the work done on time. The engineers used a very structured development process and, because they were using NAS, they didn't have to spend time developing application services or debugging.

Finally - and perhaps the most important point of all - the only reason Net Explorer was able to meet the performance requirements for the O Store with such a rapid development cycle was the sophisticated level of caching control that NAS offers (and that other application servers do not). By adding just a few lines of code, they could configure the system so that most client requests would return previously computed results, without requiring server-side processing and database access.


TAKING THE LEAP

Corby Page warns that the transition to a multitiered architecture cannot be smooth: you must "take the leap." But having made this move - in particular, to Netscape Application Server - you'll find that the development and deployment advantages were well worth it. As the Net Explorer team observed from their work on Oakley's O Store, building web applications on the NAS foundation will speed up development to an amazing degree and give you more time to focus on your customers' needs.


Caroline Rose was one of the original authors of Apple's Inside Macintosh series of developer documentation about the Mac OS. Now, after stints with NeXT and Apple (again), she does technical writing and editing on a contract basis; for more information, check out her web site.