What is an application server ?
In a nutshell an application server is a server side application which provides a runtime environment and industry services for applications which are installed on it. So basically an application server is composed of two core elements:
- The runtime environment where application can be executed
- A set of standard industry services
Altough the term application server is not bound to a particular technology it is commonly related to Oracle's Java Enterprise computing platform.
Advantages of using application servers
The application server represents a typical component that is part of a three tier architecture where presentation, application processing, and data management functions are logically separated.
As a matter of fact, one of the main advantages of using application servers are:
- Separation of concerns: the application view is separated from the business tier which is usually developed in a separate application module
- Extensibility: application servers are modular components which can be extended and customized by the user in order to meet his needs
- Scalability: most application servers provide a runtime environment which can be executed as a cluster; that is, more processes of the application servers can be added in order to cope with application requests and this happens transparentely for the end user
- Security: application server allow different level of security in order to meet the industry security standards, therefore most of the time you have just to configure the application server security module to use the standard certificates, without the need to learn complex APIs
Services provided by application servers:
An application server provides several services the application servers running on the top of it, however the three most common services are:
Database connection pooling: a connection pool is a cache of database connections which are pre-created so that they can be reused when future requests to the database are required. Connection pools are normally used to enhance the performance of executing commands on a database since the database connection overhead is performed just once.
Messaging services: a messaging service allows application components to create, send, receive, and read messages using both synchronous and asynchronous styles. A messaging service also allows the communication between different components of a distributed application to be loosely coupled and reliable.
Service Components (like EJBs) that can be used to provide a standard way to implement the back-end procedures that are typically found in enterprise applications. Such components are intended to handle such common concerns as persistence, transactional integrity, and security in a standard way, leaving programmers free to concentrate on the particular problem at hand.
Here's a typical stack of services provided by the application server:
How the application server provides its services
Most application server services are provided by means of a Naming Directory service also known as JNDI that provides a mechanism to bind an object to a name and a directory-lookup interface that allows general queries.
Here's a picture which shows the typical interaction between the applications, the JNDI services and the application server's services.
Which are the most used Java application servers:
There is a wide list of application servers which are both opensource and vendor alike. This is a list of the most used ones by Java developers:
JBoss application server (recentely renamed as wildfly) is the most popular Java Enterprise opensource application server which is usable on any operating system that supports Java. JBoss was developed by JBoss, now a division of Red Hat and licensed under the terms of the GNU Lesser General Public License. Besides the free-to-use application server, RedHat offers also the JBoss Enterprise Platform which is a licensed version of JBoss application server that is supported commercially by Redhat.
GlassFish is an open-source application server project initially started by Sun Microsystems and now sponsored by Oracle Corporation. . GlassFish is free software, dual-licensed under two free software licences: the Common Development and Distribution License (CDDL) and the GNU General Public License (GPL) with the classpath exception.
Apache Geronimo is another open source application server developed by the Apache Software Foundation and distributed under the Apache license. The latest release of Apache Geronimo 3 is compatible with Java EE 6.0.
Oracle WebLogic Server forms part of Oracle Fusion Middleware portfolio and supports Oracle, DB2, Microsoft SQL Server, MySQL Enterprise and other JDBC-compliant databases.
WebSphere Application Server (WAS) is IBM's WebSphere application server suite and supports all standard IBM solutions like IBM Web Server, IBM MQ, DB2 and more.