Home > Software Engineering > Application Server vs Web Server

Application Server vs Web Server

Recently I have faced a question in an interview about difference between application server and web server.
While in interview I have some what explained the difference by intuition but was not very clear about the answer
on theoretical grounds. My answer was

Web Server makes subset of Application Server as it server only web application while application server can serve web and other type of applications

Later I searched web on this topic and found similar explanations.

Q. What is the difference between an application server and a Web server?

A. Taking a big step back, a Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call. A little more precisely, you can say that:

The Web server
A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols. A Web server handles the HTTP protocol. Understand that a Web server’s delegation model is fairly simple. When a request comes into the Web server, the Web server simply passes the request to the program best able to handle it. The Web server doesn’t provide any functionality beyond simply providing an environment in which the server-side program can execute and pass back the generated responses. The server-side program usually provides for itself such functions as transaction processing, database connectivity, and messaging.

The application server
As for the application server, according to our definition, an application server exposes business logic to client applications through various protocols, possibly including HTTP. In most cases, the server exposes this business logic through a component API, such as the EJB (Enterprise JavaBean) component model found on J2EE (Java 2 Platform, Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, resource pooling, and messaging.

One more interesting thing which has reduced the difference lines between web and application server

Recently, XML Web services have blurred the line between application servers and Web servers. By passing an XML payload to a Web server, the Web server can now process the data and respond much as application servers have in the past.

Hope you have well understood the concept. So keep watching for more interview teasers

Some of the contents of this post are taken from Java World

Categories: Software Engineering
  1. January 10, 2010 at 6:52 pm

    I’d answer to this question very much like you, emphasizing the fact that app server in java (don’t have much to say about .net platform) is nothing more then application running on the JVM.

  2. Anonymous
    January 11, 2010 at 5:50 am

    Sounds good.. Keep posting..

  3. Anonymous
    June 15, 2010 at 1:33 pm

    Supports HTTP protocol. When the Web server receives
    an HTTP request, it responds with an HTTP response,
    such as sending back an HTML page (static content) or
    delegates the dynamic response generation to some
    other program such as CGI scripts or Servlets or JSPs in
    the application server.

    Uses various scalability and fault-tolerance techniques.

    Application Server:-

    Exposes business logic and dynamic content to the client
    through various protocols such as HTTP, TCP/IP, IIOP, JRMP etc.

    Uses various scalability and fault-tolerance techniques. In addition
    provides resource pooling, component life cycle management,
    transaction management, messaging, security etc.
    Provides services for components like Web container for servlet
    components and EJB container for EJB components.

    Muhammad Abid

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: