Application Servers FAQ

Covero Consulting Group, Inc.
Last updated Monday, March 20, 2000

What is an application server?
An application server is software that provides the middle tier of a three-tier or n-tier architecture. Three tiers of this system are the presentation tier, the business logic tier, and the data and services tier. The presentation tier consists of a so-called "thin client," which is typically a web browser. The data and services tier consists of back-end resources, such as relational databases, LDAP name servers, and legacy mainframe systems. The middle tier connects the client and back end layers; these layers never communicate directly with one another. The middle tiers may consist of just an HTTP server, just an application server, or an HTTP server that communicates with an application server.

At their most basic level, application servers enable clients to connect to the system, authenticate them, and manage their requests for the back-end resources [1].

What services does an application server provide?
Application servers provide system-level services that enable development of the middle tier of a three-tier system. This middle tier consists of the business logic that drives the overall system. These services include [2]:

  • Serving both static and dynamic web pages
  • Host business logic
  • Session state management
  • Scalability
  • Robustness
  • Security
  • Transaction services
  • Consistent access methods for a wide variety of third-tier resources, including relational databases, Lotus Notes, ERP systems such as SAP or PeopleSoft, etc.
  • Centralized remote administration
     

Do application servers include an HTTP (Web) server?
Some do.

Do I have to use the HTTP server provided by the application server?
Usually not. Most application servers that contain their own HTTP server will also work with other HTTP servers using standard interfaces such as ISAPI (Microsoft), NSAPI (Netscape), and the Apache API.

What is session state management?
Application servers maintain state data for the duration of a user's session [1]. This is important, because the HTTP protocol is stateless. An example of session state is the items a user has placed in their shopping cart. There are other ways to maintain session state, of course. You can use cookies, append parameters to URLs, or maintain it in a relational database accessible via a unique session ID. Using an application server to maintain session state can be simpler, and if the app server supports in-memory state management, can increase performance.

How do application servers enable high-performance, scalable systems?
Application servers enable developers to create high-performance, scalable systems by providing load balancing, pooling, and caching. Load balancing directs users' requests to different server in the server cluster. Simple load balancing systems use a round-robin approach; each new session is sent to the next server in the cluster. More sophisticated load balancing systems keep track of how busy each server is, and send new sessions to one of the less busy servers.

Pooling is provided for database connections; drawing a new connection from a pool of existing, open connections is faster than creating a new connection each time. Some application servers also pool threads and component instances to increase performance.

Some application servers cache dynamically-generated HTML pages; this can increase performance for frequently viewed pages that don't vary every time they're displayed.

Some application servers also enhance performance by providing native JDBC drivers for popular databases, such as Oracle, SQL Server, and Sybase. These drivers usually have better performance than generic JDBC drivers for these databases.

How do application servers enable robust systems?
Application servers enable developers to create highly robust systems by providing process isolation and fail-over mechanisms. Process isolation has the same goal for application servers as it does for standard operating systems: ensure that one process cannot crash other processes.

Fail-over handling causes the application server to stop sending requests to a server that goes down. This prevents new user's requests from being routed to servers that aren't responding. Some servers provide session-level fail-over, which essentially moves existing users' session states from servers that have failed to a running server; this enables users who are accessing a server that fails to continue their session [1].

It's important to determine whether an application server provides fail-over only for the HTTP server, or also for middle tier components. If a server only provides fail-over for the HTTP server, then users whose session is interrupted by a failed HTTP server will be able to continue their session, but users whose session is interrupted by a failed EJB server will not be able to continue their session.

How do application servers enable secure systems?
Beyond user authentication and authorization, application servers can enable the development of secure systems by supporting encryption of data packets within the system. This can be important, for instance, if various pieces of a system are located on different sides of a firewall.

Most servers support Secure Socket Layers (SSL), and some support X.509 certificates.

How is an application server's transaction management different from a relational database's transactions?
Application server transaction management is similar to database transactions (commit, rollback). High-end application servers extend transaction management beyond database transactions, and operate transparently across all the back-end resources. Thus, if a transaction that affected both a relational database and an LDAP server needs to be rolled back, the application server handles both rollbacks.

How do I get access to application server services?
Every application server has its own API. This can increase the learning curve for using an application server, and also lock your code into running inside that server.

Many application servers also support standard APIs for accessing their functionality. The most common APIs are CORBA and Enterprise Java Beans (EJB). Accessing server functionality via these APIs makes it possible to move your code to a different application server.

What operating systems do application servers run on?
Most application servers run on Solaris; many also run on Windows NT. More and more are available on Linux. Application servers written in Java are available on a wide variety of platforms; for instance, WebLogic is available for Windows NT, Sun Solaris, HP-UX, IBM AIX, Linux, OS/400, Compaq Tru64 Unix, SGI IRIX, and Siemens Reliant Unix.

Do application servers support clients other than HTML browsers?
Some do. WebLogic, for instance, supports static and dynamic HTML clients, XML clients, and Java Applets.

Do application servers contain development environments?
Some application servers integrate their own development environments, and some support standard tools.. Application servers that are focused on developing Java-based Web applications tend to support any Java development tools that can create standard components, such as EJB; these types of servers are called pure-play servers. In contrast, develop-and-deploy servers include robust development environments. They tend to force developers to use their tools, especially for generating HTML. With some of these servers, it can be difficult to use other HTML generating tools.

Client/server vendors such as Microsoft and Sybase also offer application servers. These tend to be focused on the vendor's existing technology; for instance, Microsoft Transaction Server's component architecture is COM objects [3].

Where can I find a list of available application servers?
WebReview.com contains a list of application servers with short descriptions of each [4]. DevX offers a list, although the description of each server seems to have come directly from the various vendors [5]. App-Serv Central also provides a list, including links to financial information for publicly-traded vendors [6]. ServerWatch's list has links to their reviews, which are usually fairly insightful [7].

If I use an application server, do I have to write code in Java?
Probably not, but it depends on the application server. A few support only Java components. Others, such as Netscape Application Server, support both Java and C++ components. Many support CORBA objects. Microsoft's MTS supports COM objects, which can of course be written in Visual Basic. Some application servers support scripting languages, usually either JavaScript or a proprietary scripting language such as Cold Fusion's.

How much do application servers cost?
The cost of application servers varies widely. The Galileo Application Server is free; Sun's upcoming iPlanet Application Server run-time license will cost $35,000/CPU. Some servers also charge high fees for each developer seat. Obviously, the cost of both development and run-time licenses will be a factor in most company's decision making process when choosing an application server.

What is Java2EE?
Sun's Java 2 Platform, Enterprise Edition defines a standard architecture for multi-tier applications. It contains the following APIs:

  • Enterprise JavaBeans (EJB)
  • JDBC – relational database access
  • JDNI (Java Naming and Directory Interface) – name and directory (LDAP) access
  • JMS (Java Message Service) – send and receive messages via enterprise messaging systems
  • JTS (Java Transaction Service) and JTA (Java Transaction API) – manage transactions
  • JavaMail – send email
  • JavaIDL – standard API to access CORBA services
  • Java Servlets
  • JavaServer Pages (JSP)
J2EE also include a compatibility test suite, Sun BluePrints™ Design Guidelines, and a reference implementation. These parts of J2EE are designed to ensure compatibility of J2EE components across implementations.

What are Enterprise Java Beans?
Enterprise Java Beans (EJB) provide a standard interface for business objects on EJB compliant application servers. This makes them portable between application servers. Furthermore, EJB contains provide a layer of indirection for EJB's methods; this enables EJBs to be distributed components. That is, code that accesses an EJB's methods does not know or care whether than EJB is running on the same server, a different server, or even a remote server.

There are two types of EJBs: session beans, and entity beans. Session beans keep track of session data. Entity beans access third-tier resources in a transactional manner.

EJB containers can also manage EJB persistence by invoking callbacks to control bean life cycle. In many cases, the EJB container can actually persist and re-instantiate EJBs [8].

What is a Java servlet?
A Java servlet is a Java program that runs on a server. It receives requests from clients and generates responses to them. Requests are typically HTTP GET or PUT requests, and the responses are usually HTML, although they can be other data types such as GIF. Because servlets are Java code, the response they generate is dynamic. Servlets can also access Java APIs, such as JDBC, to obtain information from third-tier resources for use in generating a response. A servlet can be thought of as the Java equivalent of a CGI or Perl script.

To use servlets, a web server must include a servlet engine. Servlet engines are also included in most application servers. Free servlet engines, such as JRun, can add servlet and JSP capability to most web servers without the use of an application server.

What are JavaServer Pages?
JavaServer Pages (JSP) are similar to Microsoft's Active Server Pages technology. JavaServer Pages are files that contain a mix of HTML and Java code. The technology is based on Java servlets. The first time a JSP page is requested, the page is transformed into a servlet, which is then compiled and executed like any other servlet. Like servlets, the Java code in a JSP page can access other Java APIs.

Most but not all servlet engines include support for JavaServer pages.

References

Benfield, S., What Do Application Servers Really Do?, in Web Techniques, WebReview.com

WebLogic, What is WebLogic Server?, WebLogic Corp

Benfield, S., The Application Server Marketplace, in Web Techniques

WebReview.com, Application Server, WebReview.com

www.devx.com, Guide to Application Servers

www.app-serv.com, The Contenders

www.ServerWatch.com, Application Servers, ServerWatch

Ayers, D., et al., Professional Java Server Programming, Birmingham: Wrox Press


Return to top
Return to the Resources page
Contact us