应用服务器和Web服务器之间的区别?
我可以知道应用服务器和网络服务器之间的区别吗?请列出每一个的例子。
May I know the differences between application servers and web servers? Please list examples of each.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Web 服务器有时可以充当应用程序服务器(例如,当它托管 Web 服务时)。但是,应用程序服务器不必实现为 Web 服务器。它可以只监听 TCP 套接字并采取相应的行动
A web server can sometimes act as an application server (for example, when it hosts web services). However, an application server does not have to be implemented as a web server. It can just listen on tcp sockets and act accordingly
Web 服务器
Web 服务器处理 HTTP 协议。当 Web 服务器收到 HTTP 请求时,它会使用 HTTP 响应进行响应,例如发回 HTML 页面。为了处理请求,Web 服务器可能会使用静态 HTML 页面或图像进行响应、发送重定向或将动态响应生成委托给某些其他程序,例如 CGI 脚本、JSP (JavaServer Pages)、servlet、ASP (Active Server Pages) )、服务器端 JavaScript 或其他一些服务器端技术。无论其目的是什么,此类服务器端程序都会生成响应(最常见的是 HTML 格式),以便在 Web 浏览器中查看。
了解 Web 服务器的委派模型相当简单。当请求进入 Web 服务器时,Web 服务器只是将请求传递给最能处理它的程序。 Web 服务器除了简单地提供服务器端程序可以执行并传回生成的响应的环境之外,不提供任何功能。服务器端程序通常为自身提供事务处理、数据库连接和消息传递等功能。
虽然 Web 服务器本身可能不支持事务或数据库连接池,但它可以采用各种容错和可伸缩性策略,例如负载平衡、缓存和集群,这些功能经常被错误地指定为仅为应用程序服务器保留的功能。
应用服务器
对于应用服务器,根据我们的定义,应用服务器通过各种协议(可能包括HTTP)向客户端应用程序公开业务逻辑。 Web 服务器主要处理发送 HTML 以在 Web 浏览器中显示,而应用程序服务器提供对业务逻辑的访问以供客户端应用程序使用。应用程序可以使用此逻辑,就像调用对象的方法(或过程世界中的函数)一样。
此类应用服务器客户端可以包括在PC、Web服务器、甚至其他应用服务器上运行的GUI(图形用户界面)。在应用程序服务器与其客户端之间来回传输的信息不限于简单的显示标记。相反,信息是程序逻辑。由于逻辑采用数据和方法调用的形式,而不是静态 HTML,因此客户端可以根据需要使用公开的业务逻辑。
在大多数情况下,服务器通过组件 API 公开此业务逻辑,例如 J2EE(Java 2 平台企业版)应用程序服务器上的 EJB(企业 JavaBean)组件模型。此外,应用程序服务器管理自己的资源。此类看门职责包括安全、事务处理、资源池和消息传递。与 Web 服务器一样,应用程序服务器也可以采用各种可扩展性和容错技术。
The Web server
A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programs generate a response, most often in HTML, for viewing in a Web browser.
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.
While a Web server may not itself support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering—features oftentimes erroneously assigned as features reserved only for application servers.
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. While a Web server mainly deals with sending HTML for display in a Web browser, an 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 an object (or a function in the procedural world).
Such application server clients can include GUIs (graphical user interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information is program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic however it wants.
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. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques.
“网络服务器”通常是使用 http(或 https)协议。这些服务器倾向于侦听特定端口(80 或 443)。这些客户端通常是 Chrome、Firefox 或 Internet Explorer 等网络浏览器。
Web 服务器示例:Apache、Microsoft IIS
“应用程序服务器”是一个更加模糊、定义不太明确的术语。它可以指对给定应用程序的客户端请求提供响应的任何程序。
在网络服务的上下文中,“应用程序服务器”往往是指用于生成动态内容的更高级别的框架。这可能是某种容器,您可以在其中部署特定的“Web 应用程序”。示例包括 Apache Tomcat、WebSphere、JBoss 等。
在这两种情况下,该术语还可以指托管软件来执行这些操作的机器硬件。
A 'web server' is generally any server program which serves content using the http (or https) protocols. These servers tend to listen on specific ports (80, or 443). The clients for these are generally web browsers like Chrome, Firefox or Internet Explorer.
Examples of web servers: Apache, Microsoft IIS
'Application server' is a far more fuzzy, less well defined term. It could refer to any program providing responses to client requests for a given application.
In the context of webserving, an 'application server' tends to refer to a higher level framework used to generate dynamic content. This could be some kind of container, within which you can deploy a particular 'web application'. Examples would include Apache Tomcat, WebSphere, JBoss etc.
In both cases, the term could also refer to the machine hardware which hosts software to do these things.
web服务器是一个像servlet/jsp容器一样进行简单操作的容器。
应用程序服务器是一个类似于 Web 服务器的容器,但比 Web 服务器添加了更多操作,如事务管理器、数据源、集群、负载平衡、消息传递和其他复杂的业务操作。
网络服务器,如 apatche tomcat。
应用服务器,如 jboss、glassfish、web sphere、oracle 应用服务器。
web server is a container for simple operations like servlet/jsp container.
application server is a container like web server but add more operations than web server like transactions manager, data source, clustering, load balance, messaging ,and others complicated business operations .
web server like apatche tomcat.
application server like jboss, glassfish, web sphere, oracle application server.