How to Web-enable your HP3000 Applications
Today’s web users expect more than sites with just visual charisma. They have come to demand full interactive and timely access to real time information. Most Information System plans now include designs for web enabled applications that extend and enable key business functions. This dictates that web sites which were once a set of static text and pictures be upgraded by including weblications (web enabled applications) that replace legacy terminal interfaces. This eliminates complex navigation of endless menus isolated on individual platforms and allows for hot links and direct access to applications thus extending and amplifying existing applications and database assets.
The general advantages of weblications are chiefly: a common user interface, interoperability with other applications, and platform independence. Specific to the HP3000, access via the browser eliminates terminal emulators, minimizes the user license requirements (browser access does not count as a user), and increases performance.
The purpose of this article is to provide a thumbnail sketch of the software and hardware issues for building weblications and implementing Apache and Samba on the HP3000.
The HP3000 with the release MPE/iX 6.0 includes at no additional cost, Apache and Samba. These products allow any HP3000 system to be transformed into a state-of-the-art WEB server. Apache is one of the leading web server packages in use today. Full documentation of the Apache server can be found at www.apache.org. Some examples of HP3000 weblications can be found at jazz.external.hp.com/demo.html. The jazz web site also has older versions of Apache and Samba that can be downloaded for MPE/iX 5.5 with various patches.
The Samba software allows the HP3000 to act as a windows file server. This greatly simplifies development of web pages because many of the best HTML publishing packages are windows based. One that I have used and recommend is HotDog at www.sausage.com. A demo version is downloadable at their site. All web sites are a collection of interrelated files. Using Samba makes it a `drag and drop` operation to manipulate these HTML directories and subdirectories on the HP3000. Some of the HTML publishing packages including HotDog support FTP for these manipulations, but I prefer direct access.
At this point we have an HP3000 running MPE/iX 5.5 or 6.0 with Apache serving web pages designed with a publishing package such as HotDog. How do I interface to existing applications and databases? The most predominate method is to use the Common Gateway Interface, or CGI standard. Another slightly more complex but also more feature filled method is to use JAVA applets and servlets.
CGI is a standard for programs or scripts to interface with HTTP servers such as Apache. The CGI call is executed like a createprocess so that it can execute and create dynamic web content. Thus it is relatively straightforward to modify an existing program to utilize HTML tags in lace of a VPLUS call or escape sequences to format a screen.
Any program written in any language or shell such as the CI, SH.HPBIN.SYS, or PERL can serve as a CGI child process as long as it follows the standards for input and output communications. The program must read STDIN (Cobol ACCEPT verb) and write to STDOUT (Cobol DISPLAY verb).
The typical sequence of a CGI process is to read and parse the contents of the submitting form. The next time you use a search engine, inspect the URL and picture the code necessary to extract the parameters from STDIN string. The next step is to use the parameters from the string to access the database. And the final step is to format the response in HTML format.
The CGI web protocol is a stateless architecture. The request is made to Apache from the browser and the information is provided, then the child process dies. Apache has no direct way of “session-izing” the requests. Therefore, the CGI program or script must contain code to keep track of the user requests and what information was sent to the user to emulate a session environment. A good starting reference for CGI can be found at hoohoo.ncsa.uiuc.edu/cgi.
A good place to start learning about JAVA can be found at java.sun.com/starter.html. Simply stated, JAVA is a programming language that can be used to write client and server programs that are platform independent. The client programs that execute within the browser are referred to as applets, and the server programs that execute under the server such as Apache are referred to as servlets.
Java applets allow development of stateful or session-like client applications. Because the programs remain active between requests, they can operate as true Windows-like applications. It is well beyond the scope of this article to cover JAVA in detail. The best MPE/iX JAVA documentation can be found at jazz.external.hp.com/src/java/index.html.
Providing WEB server access creates additional considerations for the hardware configurations and operational procedures for the server systems, namely reliability and availability. Although it could be argued that all production HP3000s should avoid single disc failure outages by implementing Mirrored Disc/iX or RAID disc arrays, it is imperative for WEB serving systems. The relationship of speed, capacity, and price, or commonly referred to as the price performance curve, of discs has shifted dramatically in recent months thus every existing HP3000 disc configuration should be re-evaluated.
Inaugurating either of these solutions requires implementation of user volume sets. This, coupled with the existing reliability history of many HP3000s, has scared off many from even considering any changes in disc configurations. It is, however, ironic to see these same sites adding gigabytes of memory and even upgrading processors to compensate for “antique” full high disc drives. The simple fact is that with proper pathing, Mirror Disc/iX, and the latest discs, IO rates and therefore performance can be multiplied by a factor of four.
One of the secrets to simplify implementation of user volumes is to do it in phases. The first phase is to switch the production accounts over to new mirrored or RAID discs. This can be done with the BULDACCT utility and simple RESTORE. The system reliability is immediately increased because the production data is protected; and the performance is increased with faster discs. An additional benefit is that each user volume gets a separate transaction manager process (XM). Having one XM to a single system volume set is a common performance bottleneck.
It is quickly becoming a `weblicated` world, transferring user interactions from colon prompts to browser interfaces will increase productivity and provide unprecedented accessibility.