|
Merging Linux and Java on the Server Side
Merging Java and Linux on the Server SideContrary to popular opinion, Apache isn't the only Web server running under Linux. And while Apache is a great general-purpose Web server, there are some situations where Apache's not the best choice. One such: where Java is a prime consideration in setting up a Web server. If you're in the middle of a Java shop and want to go that route in the Web-server field, there are four noteworthy Java-based Web servers that run on Linux (providing you have a JVM installed on your Java server, of course). Here, we'll review the four major Java Web servers: Jigsaw, iServer, Avenida and vqServer. All four have been tested on a Slackware Linux system supporting Java via the Blackdown JVM port.
Jigsaw: The Future of HTTP?Jigsaw is not the sort of Web server that you'd build an enterprise-level Internet presence around. But if you're at all serious about staying ahead of the curve on Web protocols and infrastructures, you'll want to have a test machine running Jigsaw somewhere. Jigsaw 2.1, as developed by the World Wide Web Consortium (W3C), is designed to be a technology demonstration rather than a full-fledged release. It's purposely intended as a project to showcase new technologies; but, in the case of Jigsaw 2.0, this Web server also ends up being more robust than the average Web server. Most importantly, though, Jigsaw serves as a useful blueprint to the future of the HTTP protocol and object-oriented Web servers. As with many of the new breed of Web servers, Jigsaw is written totally in Java and works within an object-oriented framework. Java also enables Jigsaw to be extensible and portable across server platforms. The object-oriented design, while not totally new in the Web-server world (even Apache is object-oriented to a degree), is taken to the logical extreme by Jigsaw. Jigsaw at its core is nothing but a set of Java classes and extension modules. When you want to add capabilities, you can dynamically add your own modules to the server. And every resource available to the server is an object (as opposed to a CGI script or file), which means that any object can be made available to end users via HTTP or other defined protocols. W3C is responsible for overseeing Web standards, and anyone wishing conformity with HTTP/1.1 and the upcoming HTTP-NG (for Next Generation) will want to do some testing with Jigsaw, as the latest version is totally 1.1-compliant. We set up a Jigsaw server on a Slackware Linux server and threw some curveballs at it--purposely testing 1.1-compliance--and the server handled all the tasks well. Looking at Jigsaw a little more critically, it's clear that this technology demonstration really isn't ready for prime-time deployment. For instance, there's no support for virtual hosts and domains. However, one area that is ready for prime time is Jigsaw's Java-based administration applet, which makes administration go smoothly. (Alas, this tool doesn't run within a Web browser, but it can be run remotely.) You can also perform administration via a series of HTML forms. If you get lost, the Web-based documentation (both for administrators and programmers) is excellent. Jigsaw may not be totally ready for prime time, but it is invaluable as a technology demonstration for anyone wishing to see the future of Web servers.
iServer: Blurring the BoundariesIs iServer 1.6 a Web server or an application server? At the moment, it's a Web server with some application-server capabilities, but if Servertec follows through with its ambitious object-oriented development plans, in the future iServer will be added to our application-server listings as well. iServer, written entirely in Java, has the dual purpose of serving both Web pages and Java servlets. On the Web-server side, iServer is a simple multithreaded Web engine with some rather nifty features, such as implementing session-manager threads for a multiserver environment and maintaining session states. The server supports HTTP 1.1 and doesn't eat up a lot of resources: a basic iServer installation takes up 85K and the full package occupies around 125K. However, the Web server could be described charitably as bare-boned: there's no explicit Perl support (though one could implement Perl through CGI), for example. Since it can manage Java servlets, the Servertec folks are making some grandiose claims for iServer, saying that it supports the more advanced protocols like IIOP and CORBA as well as more pedestrian protocols like ODBC, JDBC, SSI and CGI. But iServer doesn't appear to support IIOP and CORBA right out of the box--instead, you'll need to create or purchase servlets (iServer does include servlets to enable JDBC and ODBC support.) iScript is a rather unique marriage of BASIC and Java, allowing you to create BASIC-like scripts for a Java environment. The trend in the Web-server world seems to be giving away a Web server and then tying users into a non-standard programming language. While there is some definite appeal to iScript, there aren't many compelling reasons to use it instead of Perl or Tcl. iServer administration is done through Web-based administration. Every aspect of iServer can be administered in this fashion, while detailed log files help track usage levels and site problems. As an application server, iServer has some attractive features, including load balancing (which allows incoming requests to a cluster to be managed in the most efficient manner, which might include redirection to a less busy server), fault tolerance and database-connection pooling. These features, which are usually found in enterprise-level application servers but not usually in Web servers, allow for a scalable Web-server installation--something that's still quite rare in the Linux world. However, there are some failings in iServer that will cause you to pause before implementing it on the enterprise level, scalability aside. Security is subpar when compared to other enterprise-level Web server or application servers. There's no provisioning for RADIUS authentication or any other third-party authentication. You must set up users, realms, access rights, resources, and access control lists by hand--you cannot import any user lists from the outside. iServer is definitely a work in progress, and it will be interesting to watch this product as it expands into the application-server space. If you're willing to evolve your own system as iServer evolves, then it makes for an attractive tool. But if your needs are of a more immediate nature, you'll want to look at a more mature application server or Web server.
Avenida: Scaling Your ServersAvenida is an inexpensive Web server that's both scalable and centrally managed. When you unarchive the Avenida distribution, you're presented with Java code and some documentation files. The documentation file that details the installation is clear on how to set up the Avenida server; more complete documentation of actual use can be found at the Avenida Web site. No matter how many separate servers you're running, you can set each of their behaviors in a central http.properties file, a simple text file that can be edited with any text editor (vi, emacs, etc.). Within this file, you can run down a list of properties and then set the values for those properties. Since each property is associated with a specific server, you can't set general properties. Though this could be a drawback if you were planning on running many servers, that isn't likely given the nature of Avenida and Java, and so in most cases isn't a major limitation. If you don't want to edit the http.properties file with a text editor, you can use the Administration Tool, which sports a graphical user interface, to change the behaviors of a specific server and write the results to the file. The Administration Tool also serves as the general interface to your servers, allowing you to start, stop and manage them. Most users will want to use it to manage their Web server, since it's a very easy-to-use program. Many Web servers (e.g., Apache) are sorely in need of good administrative tools (some are on the way for Apache), and Avenida starts out with a distinct advantage thanks to its Administration Tool. It opens with a screen that checks for which servers are initialized and then returns information on the exact status of each server. The initial installation will set up a default server on port 8000, which should serve the purposes of most Web-server managers. Buttons allow you to start and stop servers on demand. Add functions by installing specific add-on servlets, several of which are included (though you can also roll your own). For instance, there's one that sets up a proxy or automatically sends proxy requests to another server. By default, Avenida is set up to run with proxy functionality enabled. Setting up a new server isn't difficult, especially if you've set up a Web server before. After telling Avenida to create a new server and then naming it, all you need to do is configure and then start it. Configuration involves specifying a port and document root directory, then setting up new URL and MIME mappings. The one area where Avenida falls short is support policies. There's no phone or fax support if you purchase a commercial license. The Avenida folks say that this lack of support translates into lower prices for the software--and it is certainly true that Avenida is inexpensive when compared to Web servers from the likes of Netscape. However, some additional support--whether it's offered for an additional fee or limited to the first 30 days after purchasing Avenida--would be a welcome benefit for users. Avenida is among the first of what will undoubtedly be a new wave of Web servers: small, nimble, and truly cross-platform apps that offer the best in performance and ease of use. It's definitely worth a look, especially if you're committed to the Java environment.
vqServer: A Truly Personal ServerA truly personal Web server, vqServer is designed for individuals and smaller companies wishing to serve Web pages from a modest PC. Installation is a matter of unzipping the downloaded file (you'll need an unzip program with Linux; the gzip command found in most Linux distributions will work), placing the files in the correct locations, and then launching vqServer from the Java interpreter. When you're finished, you've actually installed two servers: an HTTP server on port 80 and an administration server on port 9090. Administering vqServer is a simple affair, performed by connecting your Web browser to the Control Centre. This application, which is password protected, oversees file locations, aliases, logfiles, hit, authorized users, access control lists, file types, sessions, general session settings, the TCP/IP port where the server listens for HTTP requests (the default is 8080) and more. Also, you can set the minimum and maximum number of threads the server keeps available for handling requests; when you set a minimum number of threads you're also enabling thread caching, which improves performance by decreasing the overhead associated with creating, maintaining, and destroying threads. With this you can shut down a server, abort all HTTP connections (useful when there are errant Java servlets and CGI scripts) or stop all loaded servlets. The file-handling capabilities in vqServer are noteworthy. Instead of forcing files into a public directory, vqServer uses aliases to map requests to actual filenames. The noteworthy aspect to this is that you can associate actions with specific filenames: to send the file, to redirect a request to another location, to run a Java servlet or run a CGI script. In addition, aliases control who has access to a file, which brings us to a discussion of vqServer's security features. vqServer manages access from a list of users and passwords, as well as access control lists. When you associate an alias with an access control list, only those users listed in the access control list have access to the file. vqServer keeps track of users on a detailed level: when the users were first registered and the last time they accessed your Web server, what ACLs are associated with the user and more. The emphasis in vqServer, not surprisingly, is on Java servlets, which can be more efficient than CGI scripts. The Control Centre in vqServer is a Java servlet, and there are a few other example Java servlets included with vqServer. Since vqServer conforms to version 2.0 of the Sun servlet specification, there shouldn't be too many problems when running outside servlets. In addition, vqServer allows CGI scripts to be run. You won't ever see a large corporate installation of vqServer: it's simply not the sort of feature-rich product that penetrates a corporate consciousness. But as a relatively secure Web server for a personal site--say, running a small Web site from an office or departmental computer, chiefly for file-sharing purposes--then vqServer is worth checking out.
|