Monday, July 5, 2010

Difference between Application Server and Web Server

Whoever is reading this article must have little bit of knowledge on what is server, application server and web server.

Web server handles HTTP (Hyper Text Transfer Protocol) requests, where as Application server servers business logic to application programs through many protocols like RMI IIOP (Remote Method Invocation Internet Inter-Orb Protocol), TCP/IP including HTTP. Web servers basically respond to user requests using HTTP. To process a request, A web server may respond with static HTML page, image, send a redirect, or delegate dynamic response generation to some other programs like JSP, ASP, server side java script or some other server side technology.

Web server delegation model is very simple. When a request comes into web server, it simply passes the request to other program which can efficiently handle the request, it doesn't provide any additional functionality beyond simply providing an environment in which the server side program can execute and pass back responses to web server.

Application Server exposes its business logic to its client applications through many protocols including HTTP. Application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on object. The information traveling back and forth from application server to its clients is not restricted to HTML. Instead, the information is a program logic. Since the program logic takes the form of data and method calls and not static HTML, the client can employ exposed business logic however it wants.

Application server also behaves like a web server but the converse is not true. Using application server, the business logic is separated from the markup. So that the code can be reused.

Please refer this example which differentiate application server and web server

Application server also provides some additional services like transaction management, security management, resource management and so on. If the application server is used, then the developer can only concentrate on business logic, not on additional services as they are already provided by the application server.

Web Server Examples: Apache, Apache Tomcat

Application Server Examples: Glassfish, Websphere, weblogic

No comments:

Post a Comment