What is the difference between application server and web server?
相关问题
- Web server farms with IIS ? Basic Infos [closed]
- Using WebStorm with Parse.com
- IE11 Not Displaying Image With Object Tag Through
- Node.js - Good WebServer with WebSocket-proxying &
- PermissionError: [Errno 13] Permission denied Pyth
相关文章
- WebService 启动调试后,能成功调用函数,但断点进不去任何方法
- What does “exposition only” mean? Why use it?
- “Adapter” or “adaptor”?
- Using the PHP built-in server in production
- What is {{$guid}} used for in Postman?
- How do i make my IP public, Externally can access
- How to email attachment from PHP?
- Is it possible to set up nginx without cookies?
Actually Apache is a web server and Tomcat is an application server. When as HTTP request comes to web server. Then static contents send back to browser by web server. Is there and logic do to done, then that request send to the application server. after processing the logic then response send to web server and send to the client.
The border between these two are getting ever so thinner.
Application servers exposes business logic to a client. So its like application server comprises of a set of methods(not necessarily though, can even be a networked computer allowing many to run software on it) to perform business logic. So it will simply output the desired results, not HTML content. (similar to a method call). So it is not strictly HTTP based.
But web servers passes HTML content to web browsers (Strictly HTTP based). Web servers were capable of handling only the static web resources, but the emergence of server side scripting helped web servers to handle dynamic contents as well. Where web server takes the request and directs it to the script (PHP, JSP, CGI scripts, etc.) to CREATE HTML content to be sent to the client. Then web server knows how to send them back to client. BECAUSE that's what a web server really knows.
Having said that, nowadays developers use both of these together. Where web server takes the request and then calls a script to create the HTML, BUT script will again call an application server LOGIC (e.g. Retrieve transaction details) to fill the HTML content.
So in this case both the servers were used effectively.
Therefore .... We can fairly safely say that in nowadays, in most of the cases, web servers are used as a subset of application servers. BUT theatrically it is NOT the case.
I have read many articles about this topic and found this article quite handy.
From https://en.wikipedia.org/wiki/Web_server
A web server is a computer system that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. The term can refer to the entire system, or specifically to the software that accepts and supervises the HTTP requests.
From https://en.wikipedia.org/wiki/Application_server#Application_Server_definition
An application server runs behind a web Server (e.g. Apache or Microsoft Internet Information Services (IIS)) and (almost always) in front of an SQL database (e.g. PostgreSQL, MySQL, or Oracle).
Web applications are computer code which run atop application servers and are written in the language(s) the application server supports and call the runtime libraries and components the application server offers.
Both terms are very generic, one containing the other one and vice versa in some cases.
Web server: serves content to the web using http protocol.
Application server: hosts and exposes business logic and processes.
I think that the main point is that the web server exposes everything through the http protocol, while the application server is not restricted to it.
That said, in many scenarios you will find that the web server is being used to create the front-end of the application server, that is, it exposes a set of web pages that allow the user to interact with the business rules found into the application server.
Application server and web server both are used to host web application. Web Server is deal with web container on the other hand Application Server is deal with web container as well as EJB (Enterprise JavaBean) container or COM+ container for Microsoft dot Net.
Web Server is designed to serve HTTP static Content like HTML, images etc. and for the dynamic content have plugins to support scripting languages like Perl, PHP, ASP, JSP etc and it is limited to HTTP protocol. Below servers can generate dynamic HTTP content.
Web Server's Programming Environment:
IIS : ASP (.NET)
Apache Tomcat: Servlet
Jetty: Servlet
Apache: Php, CGI
Application Server can do whatever Web Server is capable and listens using any protocol as well as App Server have components and features to support Application level services such as Connection Pooling, Object Pooling, Transaction Support, Messaging services etc.
Application Server's Programming Environment:
MTS: COM+
WAS: EJB
JBoss: EJB
WebLogic Application Server: EJB
Most of the times these terms Web Server and Application server are used interchangeably.
Following are some of the key differences in features of Web Server and Application Server:
Example of such configuration is Apache Tomcat HTTP Server and Oracle (formerly BEA) WebLogic Server. Apache Tomcat HTTP Server is Web Server and Oracle WebLogic is Application Server.
In some cases the servers are tightly integrated such as IIS and .NET Runtime. IIS is web server. When equipped with .NET runtime environment, IIS is capable of providing application services.