[hornetq-commits] JBoss hornetq SVN: r8939 - branches/HnetQ_323_cn/docs/user-manual/zh.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 22 01:35:14 EDT 2010


Author: gaohoward
Date: 2010-03-22 01:35:14 -0400 (Mon, 22 Mar 2010)
New Revision: 8939

Modified:
   branches/HnetQ_323_cn/docs/user-manual/zh/architecture.xml
Log:
save work


Modified: branches/HnetQ_323_cn/docs/user-manual/zh/architecture.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/architecture.xml	2010-03-19 17:03:28 UTC (rev 8938)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/architecture.xml	2010-03-22 05:35:14 UTC (rev 8939)
@@ -17,131 +17,79 @@
 <!-- permitted by applicable law.                                                  -->
 <!-- ============================================================================= -->
 <chapter id="architecture">
-    <title>Architecture</title>
-    <para>In this section we will give an overview of the HornetQ high level architecture.</para>
+    <title>总体架构</title>
+    <para>本章对HornetQ的总体技术架构进行了概括描述。</para>
     <section>
-        <title>Core Architecture</title>
-        <para>HornetQ core is designed simply as set of Plain Old Java Objects (POJOs) - we hope you
-            like it's clean-cut design.</para>
-        <para>We've also designed it to have as few dependencies on external jars as possible. In
-            fact, HornetQ core has only one jar dependency, netty.jar,
-            other than the standard JDK classes! This is because we use some of the netty buffer classes
-        internally.</para>
-        <para>This allows HornetQ to be easily embedded in your own project, or instantiated in any
-            dependency injection framework such as JBoss Microcontainer, Spring or Google
-            Guice.</para>
-        <para>Each HornetQ server has its own ultra high performance persistent journal, which it
-            uses for message and other persistence.</para>
-        <para>Using a high performance journal allows outrageous persistence message performance,
-            something not achievable when using a relational database for persistence.</para>
-        <para>HornetQ clients, potentially on different physical machines interact with the HornetQ
-            server. HornetQ currently provides two APIs for messaging at the client side:</para>
+        <title>核心架构</title>
+        <para>HornetQ的核心是由一组简单Java对象(POJO)构成的。同时在设计HornetQ时将对外部jar包的依赖降到最低限度。
+              实际上HornetQ的核心部分只有一个外部依赖,就是netty.jar。HornetQ使用了其中的用于缓冲的一些类。
+              我们相信这样的理念应该受到用户的欢迎。</para>
+        <para>由于依赖性很小,HornetQ可以非常容易地嵌入到其它应用中,或者加入到一些依赖注入式的框架中,
+              如JBoss Microcontainer,Spring或Google Guice。</para>
+        <para>每个HornetQ服务器都有自己的超高性能的持久日志(journal)用于消息和其它信息的持久化。</para>
+        <para>采用这种独特的高效日志要比采用普通数据库作为持久层的系统拥有更高的性能。</para>
+        <para>通常情况下分布在不同物理机器上的客户端同时访问HornetQ服务器。目前HornetQ提供了两套API供客户端使用:</para>
         <para>
             <orderedlist>
                 <listitem>
-                    <para>Core client API. This is a simple intuitive Java API that allows the full
-                        set of messaging functionality without some of the complexities of
-                        JMS.</para>
+                    <para>核心API。这是一组普通的Java接口,用它可以访问HornetQ的全部功能。</para>
                 </listitem>
                 <listitem>
-                    <para>JMS client API. The standard JMS API is available at the client
-                        side.</para>
+                    <para>JMS客户端API。这是标准的JMS API。</para>
                 </listitem>
             </orderedlist>
         </para>
-        <para>JMS semantics are implemented by a thin JMS facade layer on the client side.</para>
-        <para>The HornetQ server does not speak JMS and in fact does not know anything about JMS,
-            it's a protocol agnostic messaging server designed to be used with multiple different
-            protocols.</para>
-        <para>When a user uses the JMS API on the client side, all JMS interactions are translated
-            into operations on the HornetQ core client API before being transferred over the wire
-            using the HornetQ wire format.</para>
-        <para>The server always just deals with core API interactions.</para>
-        <para>A schematic illustrating this relationship is shown in figure 3.1 below:</para>
+        <para>实际上JMS API是在核心API的外部加上一层简单的封装。</para>
+        <para>在HornetQ内核是没有JMS的,这样设计的目的是为了支持多个协议。</para>
+        <para>当客户端通过JMS接口访问HornetQ时,所有JMS的操作都被转换成相应的核心API,然后将请求以HornetQ格式发向服务器。</para>
+        <para>HornetQ服务器只接收核心API的访问。</para>
+        <para>图3.1描述了这些操作。</para>
         <para>
             <graphic fileref="images/architecture1.jpg" align="center"/>
         </para>
-        <para>Figure 3.1 shows two user applications interacting with a HornetQ server. User
-            Application 1 is using the JMS API, while User Application 2 is using the core client
-            API directly.</para>
-        <para>You can see from the diagram that the JMS API is implemented by a thin facade layer on
-            the client side.</para>
+        <para>在图3.1中示出了两个用户访问HornetQ服务器。用户1使用JMS API,用户2使用的是核心API。</para>
+        <para>图中清楚的展示出了JMS是如何通过封装(facade)转化为核心API的。</para>
     </section>
     <section>
-        <title>HornetQ embedded in your own application</title>
-        <para>HornetQ core is designed as a set of simple POJOs so if you have an application that
-            requires messaging functionality internally but you don't want to expose that as a
-            HornetQ server you can directly instantiate and embed HornetQ servers in your own
-            application.</para>
-        <para>For more information on embedding HornetQ, see <xref linkend="embedding-hornetq"
-            />.</para>
+        <title>将HornetQ嵌入到你的应用程序中</title>
+        <para>如果你的应用程序内部需要消息服务,但同时你又不想将消息服务暴露为单独的HornetQ服务器,你可以在应用中直接将HornetQ实例化。</para>
+        <para>有关嵌入式HornetQ的详细信息请参阅 <xref linkend="embedding-hornetq"
+            />。</para>
     </section>
     <section>
-        <title>HornetQ integrated with a JEE application server</title>
-        <para>HornetQ provides its own fully functional Java Connector Architecture (JCA) adaptor
-            which enables it to be integrated easily into any JEE compliant application server or
-            servlet engine.</para>
-        <para>JEE application servers provide Message Driven Beans (MDBs), which are a special type
-            of Enterprise Java Beans (EJBs) that can process messages from sources such as JMS
-            systems or mail systems.</para>
-        <para>Probably the most common use of an MDB is to consume messages from a JMS messaging
-            system.</para>
-        <para>According to the JEE specification, a JEE application server uses a JCA adapter to
-            integrate with a JMS messaging system so it can consume messages for MDBs.</para>
-        <para>However, the JCA adapter is not only used by the JEE application server for <emphasis
-                role="italic">consuming</emphasis> messages via MDBs, it is also used when sending
-            message to the JMS messaging system e.g. from inside an EJB or servlet.</para>
-        <para>When integrating with a JMS messaging system from inside a JEE application server it
-            is always recommended that this is done via a JCA adaptor. In fact, communicating with a
-            JMS messaging system directly, without using JCA would be illegal according to the JEE
-            specification.</para>
-        <para>The application server's JCA service provides extra functionality such as connection
-            pooling and automatic transaction enlistment, which are desirable when using messaging,
-            say, from inside an EJB. It is possible to talk to a JMS messaging system directly from
-            an EJB, MDB or servlet without going through a JCA adapter, but this is not recommended
-            since you will not be able to take advantage of the JCA features, such as caching of JMS
-            sessions, which can result in poor performance.</para>
-        <para>Figure 3.2 below shows a JEE application server integrating with a HornetQ server via
-            the HornetQ JCA adaptor. Note that all communication between EJB sessions or entity
-            beans and Message Driven beans go through the adaptor and not directly to
-            HornetQ.</para>
-        <para>The large arrow with the prohibited sign shows an EJB session bean talking directly to
-            the HornetQ server. This is not recommended as you'll most likely end up creating a new
-            connection and session every time you want to interact from the EJB, which is an
-            anti-pattern.</para>
+        <title>将HornetQ与JEE应用服务器集成</title>
+        <para>HornetQ提供了标准的JCA适配器,利用它可以将HornetQ轻松地集成到任何一个符合JEE规范的应用服务器或servlet容器中。</para>
+        <para>JEE应用服务品提供了消息Bean(MDB)用于处理来自外部的消息,比如来自JMS系统或邮件系统的消息。</para>
+        <para>最常见的应用应该是用MDB来接收来自JMS系统中的消息了。在JEE规范中规定了JEE应用服务器使用JCA adaptor与JMS消息系统集成,
+              MDB通过这个adaptor来接收消息。</para>
+        <para>JCA adaptor不仅可以用来接收消息,还可以用来从EJB或servlet中向外部的JMS发送消息。在JEE应用服务器中应该用JCA adaptor与JMS系统进行交互。
+              实际上JEE规范中不允许在JEE服务器中不通过JCA而直接访问JMS系统。</para>
+        <para>在EJB中使用消息往往需要连接池或交易,而JCA可以提供这方面的服务,无需额外的开发任务。当然直接访问JMS系统是可能的,
+              但是你将不能利用JCA所提供的这些有用的功能,因此我们不建议使用直接访问的方式。</para>
+        <para>图3.2给出了HornetQ通过JCA adaptor与JEE应用服务器集成的示意图。图中可以看出所有的交互都通过JCA adaptor。</para>
+        <para>图中带有禁止符号的箭头表明的是从EJB会话Bean直接访问HornetQ的情况。由于不通过JCA,这种方法往往造成每次EJB访问HornetQ都要新建一个连接和会话,
+              使效率大降低。这被视为反设计模式(anti-pattern)。</para>
         <para>
             <graphic fileref="images/architecture2.jpg"/>
         </para>
-        <para>For more information on using the JCA adaptor, please see <xref
-                linkend="appserver-integration"/>.</para>
+        <para><xref linkend="appserver-integration"/>对如何使用JCA给出了更加详细的描述。</para>
     </section>
     <section>
-        <title>HornetQ stand-alone server</title>
-        <para>HornetQ can also be deployed as a stand-alone server. This means a fully independent
-            messaging server not dependent on a JEE application server.</para>
-        <para>The standard stand-alone messaging server configuration comprises a core messaging
-            server, a JMS service and a JNDI service.</para>
-        <para>The role of the JMS Service is to deploy any JMS Queue, Topic and ConnectionFactory
-            instances from any server side <literal>hornetq-jms.xml</literal> configuration files.
-            It also provides a simple management API for creating and destroying Queues, Topics and
-            ConnectionFactory instances which can be accessed via JMX or the connection. It is a
-            separate service to the HornetQ core server, since the core server is JMS agnostic. If
-            you don't want to deploy any JMS Queue, Topic or ConnectionFactory instances via server
-            side XML configuration and don't require a JMS management API on the server side then
-            you can disable this service.</para>
-        <para>We also include a JNDI server since JNDI is a common requirement when using JMS to
-            lookup Queues, Topics and ConnectionFactory instances. If you do not require JNDI then
-            this service can also be disabled. HornetQ allows you to programmatically create JMS and
-            core objects directly on the client side as opposed to looking them up from JNDI, so a
-            JNDI server is not always a requirement.</para>
-        <para>The stand-alone server configuration uses JBoss Microcontainer to instantiate and
-            enforce dependencies between the components. JBoss Microcontainer is a very lightweight
-            POJO bootstrapper.</para>
-        <para>The stand-alone server architecture is shown in figure 3.3 below:</para>
+        <title>HornetQ作为独立的服务(standalone)</title>
+        <para>HornetQ可以部署成为独立的服务器。它可运行于任何JEE应用服务器之外,作为一个独立的服务运行。
+              作为独立服务器运行时,HornetQ消息服务器包括一个核心服务器,一个JMS服务以及一个JNDI服务。</para>
+        <para>JMS服务用来部署服务器端<literal>hornetq-jms.xml</literal>配置文件中的JMS Queue,Topic和ConnectionFactory实例。
+              此外它还提供一组简单的管理接口,通过这些接口可以创建、消毁(destroy)Queue,Topic和ConnectionFactory实例。
+              用于可以通过JMX或连接使用这些接口。JMS服务是单独的服务,它不是HornetQ核心服务。HornetQ的核心不包含JMS相关的服务。
+              如果你不需要通过服务器端的xml配置文件部署任何JMS对象,也不需要JMS的管理接口,你可以选择不启动该服务。</para>
+        <para>启动JNDI服务的目的是因为JMS需要通过JNDI来获得Queue,Topic以及ConnectionFactory。如果不需要,也可以选择不启动该服务。</para>
+        <para>HornetQ允许在客户端程序中通过编程来直接创建各种JMS对象和核心对象来代替JNDI查找,所以JNDI不是必需的。
+              HornetQ采用JBoss Microcontainer来引导并实例化服务,并保证模块之间的依赖关系。JBoss Microcontainer是一个轻量级的POJO引导器(bootstrapper)。</para>
+        <para>图3.3给出了HornetQ独立服务器的架构。</para>
         <para>
             <graphic fileref="images/architecture3.jpg"/>
         </para>
-        <para>For more information on server configuration files see <xref
-                linkend="server.configuration"/>. $ </para>
+        <para>相关配置的相关信息可以在第<xref
+                linkend="server.configuration"/>找到。$ </para>
     </section>
 </chapter>



More information about the hornetq-commits mailing list