Mule ESB 三种构建方式简介,比较

为了节省时间,就不翻译了,摘抄重点总结下, 本文大部分摘抄自Mule ESB官网入门教程 Guide.pdf这本书中.


一 简介

Mule 3.0 provides three different constructs that can be used to build applications:
   1.Using Mule Services are the classic Mule way of organizing message flow. Each service consists of three sections:

         Input, where messages are received
         An optional component, where any sort of application logic can be applied to a message
         An optional output, where the messages are sent to other services or transports.
  

    2.Using Flows for Service Orchestration, which are new in Mule 3.0. A flow is a combination of message sources and message processorsthat doesn't have as fixed a format as a service does. It can be as simple or as complex as required, and can include, for instance,processing by multiple components before any output is performed.
  

    3.Using Mule Configuration Patterns are also new in Mule 3.0. A configuration pattern is like a pre-built flow: the logic is already built into it,so that only some simple tailoring is needed to make it functional.

A Mule application can contain any or all of these.

二 如何选择

     选择 pattern的情形

      Mule 3 includes a number of configuration patterns designed to solve common integration problems with minimal XML. These patterns are similar to Enterprise Integration Patterns which are also widely supported in Mule but tackle bigger use cases, like creating a web service proxy. Take amoment to inspect the list of patterns. If your project requires a more complex set of operations, you might want to consider flows which are
introduced in Mule 3.

     选择service的情形

    Mule's serviced-based architecture is well suited for many scenarios where you are using Mule as a service container and exposing services over
one or more endpoints. If you're familiar with using previous versions of Mule, you can continue - with very few changes - doing things the same
way.

     选择flow的情形

    A Flow is a simple yet very flexible mechanism that enables orchestration of services using the sophisticated message flow capabilities of Mule
ESB. Using Flow, you may automate integration processes and construct sophisticated integration solutions by simply building them from the
basic Building Blocks provided by Mule. Because of the flexibility of Flow, it is much easier to create solutions that more closely match your
requirements. Flow is new in Mule 3.

    有些情况service比flow更好,比如这种情形

   You still may choose to use Services in some cases. For example, if all you wish to do is expose a single service backed by a service component
and your requirements are more complex than with Simple Service supports, then a Mule Service is still a good choice. Existing Mule services
can also be easily integrated into a flow. Finally, flows do not yet support all features of Mule. In particular, services are still required if you want to
do any of the following:
Transactions configured anywhere other than on endpoints e.g. on routers (including local, multi-tx, and XA)
Request-Reply




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值