• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】应用服务器是什么

问答 admin 3年前 (2020-08-07) 477次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

应用服务器是指通过各种协议把商业逻辑曝露给客户端的程序。它提供了访问商业逻辑的途径以供客户端应用程序使用。应用服务器使用此商业逻辑就像调用对象的一个方法一样。

Application server is a program that exposes business logic to client through various protocols. It provides access to business logic for client applications. The application server uses this business logic just like calling a method of an object.

应用服务器是指通过各种协议把商业逻辑曝露给客户端的程序。它提供了访问商业逻辑的途径以供客户端应用程序使用。应用服务器使用此商业逻辑就像调用对象的一个方法一样。

Application server is a program that exposes business logic to client through various protocols. It provides access to business logic for client applications. The application server uses this business logic just like calling a method of an object.

定义

definition

随着 Internet 的发展壮大,“主机/终端”或“客户机/服务器”的传统的应用系统模式已经不能适应新的环境,于是就产生了新的分布式应用系统,相应地,新的开发模式也应运而生,即所谓的“浏览器/服务器”结构、“瘦客户机”模式。应用服务器便是一种实现这种模式核心技术。

With the development of the Internet, the traditional application system mode of “host / terminal” or “client / server” can no longer adapt to the new environment, so a new distributed application system is produced. Accordingly, a new development mode emerges, namely the so-called “browser / server” structure and “thin client” mode. Application server is a core technology to realize this mode.

Web 应用程序驻留在应用服务器(Application Server)上。应用服务器为 Web 应用程序提供一种简单的和可管理的对系统资源的访问机制。它也提供低级的服务,如 HTTP 协议的实现和数据库连接管理。Servlet 容器仅仅是应用服务器的一部分。除了 Servlet 容器外,应用服务器还可能提供其他的 Java EE(Enterprise Edition)组件,如 EJB 容器,JNDI 服务器以及 JMS 服务器等。

Web applications reside on the application server. Application server provides a simple and manageable access mechanism to system resources for web applications. It also provides low-level services, such as the implementation of HTTP protocol and database connection management. The servlet container is only a part of the application server. In addition to the servlet container, the application server may also provide other Java EE (Enterprise Edition) components, such as EJB container, JNDI server and JMS server.

市场上可以得到多种应用服务器,其中包括 Apache 的 Tomcat、IBM 的 WebSphere Application Server、Caucho Technology 的 Resin、Macromedia 的 JRun、NEC WebOTX Application Server、JBoss Application Server、Oracle(并购了 BEA)的 WebLogic 等。其中有些如 NEC WebOTX Application Server、WebLogic、WebSphere 不仅仅是 Servlet 容器,它们也提供对 EJB(Enterprise JavaBeans)、JMS(Java Message Service)以及其他 Java EE 技术的支持。每种类型的应用服务器都有自己的优点、局限性和适用性。

A variety of application servers can be obtained in the market, including Tomcat of Apache, websphere application server of IBM, resin of caucho technology, jrun of Macromedia, NEC webotx application server, JBoss application server, Weblogic of Oracle (merged with BEA), etc. Some of them, such as NEC webotx application server, Weblogic and WebSphere, are not only servlet containers, but also support EJB (Enterprise JavaBeans), JMS (Java Message Service) and other Java EE technologies. Each type of application server has its own advantages, limitations and applicability.

分类

classification

通常,根据确定文档内容的时间,所有文档可以划分为如下三类。

Generally, all documents can be divided into three categories according to the time when the content of the document is determined.

静态

static state

静态:静态 Web 文档是一个存储于 Web 服务器的文件。静态文档的作者在写作的时候确定文档的内容。由于文档内容不会变化,所以对静态文档的每次访问都返回相同结果。

Static: a static web document is a file stored on a web server. The author of a static document determines the content of the document as it writes. Since the content of the document does not change, every visit to a static document returns the same result.

动态

dynamic

动态:动态 web 文档不是以一个预先定义的格式存在,而是在浏览器访问 web 服务器时创建。当一个请求到达时,web 服务器运行一个应用程序创建动态文档(dynamic documents),服务器返回程序的输出作为应答。由于每次访问都要创建新的文档,动态文档的内容是变化的。

Dynamic: dynamic web documents do not exist in a predefined format, but are created when the browser accesses the web server. When a request arrives, the web server runs an application to create dynamic documents, and the server returns the output of the program as a response. Since a new document is created for each visit, the content of a dynamic document changes.

活动

activity

活动:一个活动文档不完全由服务器一端说明,而是包括一个计算并显示值的程序。当浏览器访问活动文档时,服务器返回一个浏览器可以本地执行的程序。当该程序运行时,它可以和用户交互执行并不停地改变显示。这样,活动文档的内容是不固定的-只要用户让程序保持运行,它总是在不停地变化。静态文档的主要优点在于它的简单、可靠性和性能。由于静态文档是直接指定格式。它可以由不懂编程的人创建。更重要的是,在已经创建和测试之后,静态文档永远是正确的。最后,浏览器可以快速存取文档,同时通过把文档放在本地盘上的缓冲区内以加快以后对这些文档的访问速度。 静态文档的主要缺点是不灵活-当信息变化时文档必须重新设计。另外,改变是很耗费时间的,因为它需要人工修改文件。因此,静态文档不适合频繁变化的报告信息。动态文档的主要优点是它报告当前信息的能力。例如,一个动态文档可以用来报告股市行情、天气预报或音乐会售票情况等内容。当浏览器申请信息的时候,服务器运行一个应用程序,访问所需要的信息,并创建一个文档,服务器于是将该文档返回给浏览器。动态文档把任务放在服务器一端,浏览器采用和静态文档同样的方法访问动态文档。实际上,从浏览器的角度来看。动态文档和静态文档是无区别的。由于动态文档和静态文档都采用 H T M L 编写,浏览器不知道服务器是从一个磁盘文件还是计算机程序中取得文档。动态文档的主要缺点是增加成本和不能显示变化的信息。和静态文档类似,动态文档在浏览器取得文档后不会再改变。因此在信息发送给浏览器之后,文档就开始过时。例如一个报告股市信息的动态文档,由于股市信息变化迅速,当用户访问时文档很快就过时。动态文档的创建和访问成本比静态文档昂贵。创建动态文档的代价较高,因为动态文档的创建者必须懂得如何写程序。另外,程序必须仔细编写和广泛测试,以保证输出的合法性。验证这样一个程序的正确性是很困难的,因为输入可以包含不同来源的多种数据。动态文档除了创建成本高,所需的硬件成本也较高,因为服务器端需要更强大的计算机。最后取出动态文档需要的时间稍多些,因为服务器需要额外的时间去运行程序创建文档。尽管在申请到达时动态文档才创建,但信息可能很快过时,活动文档相对于动态文档的主要优点在于它持续更改信息的能力。例如,只有活动文档能够快速改变显示以显示动画。更重要的是,活动文档能够直接访问信息源并连续更改显示。例如,一个显示股市行情的活动文档可以连续读取股市信息,并且不需要用户干预而自动修改显示。活动文档的主要缺点是创建和运行这种文档所需的额外费用,同时缺少安全性。首先,活动文档的显示需要更复杂的浏览器软件和一个强有力的计算机运行浏览器。另外,写正确的活动文档比写其他画面需要更多的编程技巧,所得到的结果文档更难于测试。而且,由于活动文档必须运行在客户端而不是服务器端,程序必须解决在不同客户上的兼容性问题,最后,活动文档存在着潜在的安全性问题,因为文档既输入信息又输出信息。

Activity: an active document is not fully described by the server side, but includes a program that calculates and displays values. When the browser accesses the active document, the server returns a program that the browser can execute locally. When the program is running, it can interact with the user and change the display constantly. In this way, the content of the active document is not fixed – it is always changing as long as the user keeps the program running. The main advantages of static documents are its simplicity, reliability and performance. Because the static document is directly specified format. It can be created by people who don’t know how to program. More importantly, static documents are always correct after they have been created and tested. Finally, the browser can quickly access documents, and at the same time, it can speed up the access to these documents by putting them in the buffer on the local disk. The main drawback of static documents is inflexibility – documents must be redesigned when information changes. In addition, change is time-consuming because it requires manual modification of the file. Therefore, static documents are not suitable for frequently changing reporting information. The main advantage of dynamic documents is its ability to report current information. For example, a dynamic document can be used to report the stock market, weather forecast or concert ticket sales. When the browser requests information, the server runs an application to access the required information and creates a document. The server then returns the document to the browser. Dynamic documents put the task on the server side, and browsers access dynamic documents in the same way as static documents. In fact, from the browser’s point of view. There is no difference between dynamic and static documents. Since both dynamic and static documents are written in HTML, the browser does not know whether the server obtains the document from a disk file or a computer program. The main disadvantages of dynamic documents are the increased cost and the inability to display changing information. Similar to static documents, dynamic documents do not change after the browser gets them. So after the information is sent to the browser, the document becomes obsolete. For example, a dynamic document that reports the stock market information, because the stock market information changes rapidly, the document will be out of date quickly when users access it. Dynamic documents are more expensive to create and access than static documents. The cost of creating dynamic documents is high, because the creator of dynamic documents must know how to write programs. In addition, the program must be carefully written and widely tested to ensure the legitimacy of the output. It is difficult to verify the correctness of such a program because the input can contain multiple data from different sources. In addition to the high cost of creating dynamic documents, the hardware cost is also high, because the server side needs a more powerful computer. Finally, it takes a little more time to retrieve the dynamic document, because the server needs extra time to run the program to create the document. Although dynamic documents are created only when applications arrive, information can quickly become obsolete, and the main advantage of active documents over dynamic documents is its ability to continuously change information. For example, only the active document can quickly change the display to display animation. More importantly, the active document has direct access to the information source and continuously changes the display. For example, an active document that displays stock market information can read stock market information continuously and automatically modify the display without user intervention. The main drawback of active documents is the extra cost of creating and running such documents, as well as the lack of security. First of all, the display of active documents requires more complex browser software and a powerful computer running browser. In addition, writing the correct active document requires more programming skills than writing other pictures, and the resulting document is more difficult to test. Moreover, because the active document must run on the client side rather than the server side, the program must solve the compatibility problem on different customers. Finally, there are potential security problems in the active document, because the document inputs and outputs information.

概括

generalization

Web 文档根据文档内信息改变的时间可分为三类。静态文档的信息只有当作者修改时才会改变,动态文档的信息在服务器端收到文档申请时改变,活动文档显示的信息在文档下载到浏览器一端运行后改变。由于创建动态文档的责任在管理文档的服务器一端,支持动态文档也只需修改服务器。实际上,变化意味着扩展,管理动态文档的服务器也包含了处理静态文档的代码。处理动态文档的 Web 服务器需要三个特性。

Web documents can be divided into three categories according to the change time of information in documents. The information of the static document will change only when the author modifies it. The information of the dynamic document changes when the server receives the document application, and the information displayed in the active document changes after the document is downloaded to the browser. Since the responsibility of creating dynamic documents lies in the server side of managing documents, only modifying servers is needed to support dynamic documents. In fact, change means extending, and the server that manages dynamic documents also contains code for handling static documents. A web server that processes dynamic documents requires three features.

首先,服务器程序必须扩展,当每次请求到达时,能够执行一个单独的创建文档的应用程序。服务器必须编成能够捕获应用程序的输出,并且将该文档返回给浏览器。

First, the server program must be extended to be able to execute a separate document creation application each time a request arrives. The server must be programmed to capture the output of the application and return the document to the browser.

其次,必须为每个动态文档写一个单独的应用程序。

Second, you must write a separate application for each dynamic document.

最后,服务器必须配置成能够知道哪一个 URL 对应于动态文档和哪一个 URL 对应于静态文档。对每个动态文档,配置时必须说明产生文档的应用程序。每个申请包含着一个对应动态或静态文档的 URL,服务器使用配置信息和收到的请求中的 URL 决定如何处理。如果配置信息说明申请中的 URL 对应着一个静态文档,服务器就跟往常一样取出文件。如果申请中的 URL 对应着动态文档,服务器选择生成该文档的应用程序,运行程序,并且把程序的输出作为文档返回给浏览器。

Finally, the server must be configured to know which URL corresponds to a dynamic document and which URL corresponds to a static document. For each dynamic document, the application generating the document must be specified during configuration. Each application contains a URL corresponding to a dynamic or static document. The server uses the configuration information and the URL in the received request to decide how to handle it. If the configuration information indicates that the URL in the application corresponds to a static document, the server takes out the file as usual. If the URL in the application corresponds to a dynamic document, the server selects the application that generates the document, runs the program, and returns the output of the program to the browser as a document.

区别

difference

应用服务器和 WEB 服务器的区别

Difference between application server and web server

通俗的讲,Web 服务器传送(serves)页面使浏览器可以浏览,然而应用程序服务器提供的是客户端应用程序可以调用(call)的方法(methods)。确切一点,你可以说:Web 服务器专门处理 HTTP 请求(request),但是应用程序服务器是通过很多协议来为应用程序提供(serves)商业逻辑(business logic)。

Generally speaking, the web server delivers pages so that the browser can browse them. However, the application server provides methods that can be called by client applications. To be exact, you can say that the web server handles HTTP requests, but the application server serves business logic for applications through many protocols.

下面让我们来细细道来:

Let’s go into details:


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】应用服务器是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址