Ross Mason on Wednesday, September 15, 2010

Say Hello to Mule 3

20

The Mule team are really excited to announce Mule 3, the next generation open source ESB platform. It’s been a long time coming and the team have done a stellar job redefining what you should expect from an ESB. This release marks some significant new features as well as changes to Mule itself that result in the most powerful, light-weight and simple to use ESB out there.

oh yeah!

Mule 3

Simplicity

I set a single theme for Mule 3 – simplify everything. We want to make Mule 3 more accessible to everyone. This meant making some big architectural strides as well as embracing new technologies and building new features into the core of Mule to make building integration applications a breeze. There is still more we’d like to do so expect simplicity to be at the forefront of forthcoming releases as well.

Feature Tour

Mule 3 is packed with new features and enhancements. The team will be covering these in more depth here over the coming weeks. I’d like to highlight the major ones here.

Mule Cloud Connect

connect is all about embracing the wealth of cloud/SaaS/Social Media applications that continue to impact our lives. We increasingly see the need for applications to interact with these services, creating rich connected applications.

Mule is a set of capabilities that enable developers to integrate enterprise data and applications seamlessly with SaaS and cloud-based web applications, including:

  • Cloud connectors – out-of-the-box connectors for popular cloud, SaaS, and Web 2.0 providers (e.g., Amazon Web Services and Facebook), as well as an easy way for users to create their own cloud connectors
  • Native REST support – allows users to publish JAX-RS and consume RESTful services easily and seamlessly using Mule 3.
    Data Bindings – new capabilities that allow XML and JSON data formats to be easily consumed and automatically bound to Java objects.
  • AJAX/JavaScript integration – enables developers to access enterprise data directly from a browser-based application as well as trigger ESB actions from their JavaScript application. This makes integrating Mule services with JavaScript frameworks like MooTools, ExtJS, JQuery, Dojo, etc really easy.
  • ATOM and RSS – New features for consuming and creating feeds. This allows users to react to feeds as they are updated and create feeds from events in Mule.
  • JSON Support – Mule 3 introduces JSON data handling. As well as adding JSON transformers, JSON data can automatically be marshaled into Java objects and back to JSON.

Flow

Flow is a new powerful way of creating message flows in Mule. Many people struggle with the rigid nature of the service model in Mule because they don’t naturally think in terms of services. Flow allows developers to create integration flows they way they think about solving the problem. We’ll be talking a lot more about this in future posts.

Patterns

Patterns have always been at the core of Mule. The now well-known Enterprise Integration Patterns were first implemented by Mule back in 2004. Mule 3 sets a new level of pattern support by introducing Pattern-based configuration. These new patterns provide larger building blocks for performing common tasks such as publishing REST or RESTful Web Services, creating transactional bridges and configuring Web Service proxies.

Annotations

Annotations support has been incorporated in to Mule that address a few specific areas.

  • @Schedule annotation introduces a new way to schedule invocations of a method. This annotation supports cron or simple time intervals.
  • @Transformer annotation now makes it really easy to define custom transformers from individual methods.
  • Runtime injection annotations can now be used to inject message information into component and transformer methods. These annotations can query message headers, attachments and manipulate the payload.
  • Expression annotations such as @XPath or @Groovy can be used to manipulate the message payload and perform automatic conversions when injecting message information into a component or transformer.

Deployment

Mule has always been very flexible in the way that you can deploy the container either stand-alone or embedded in a Java application, or JEE server. One area for improvement though was the way in which you deploy applications to Mule. In Mule 3 I’m happy to say we now have some great deployment capabilities that make working with Mule more straight forward.

  • New deployment model – provides an easy well-defined path for developers to work with Mule
  • Automatic hot deployment – reduces friction during application deployment and provides immediate feedback during the development process, in addition to enabling dynamic application provisioning to running Mule servers.
  • Service and application isolation – allows services to be changed at runtime without impacting other services

Architectural Changes

Under the hood we made changes to simplify the Mule architecture. The biggest change was the introduction of a unified interface for all service and flow objects, called Message Processors. While the core concepts and features of Mule remain the same, streamlining the architecture to use Message processors has opened up a lot of new possibilities for the platform.

Other changes include -

  • Improved BPM – Mule Enterprise Service Bus integrates tightly with jBPM, allowing you to send/receive messages to/from a running process. A message from Mule can start or advance a process, the message can be used as a process variable, and a process can send messages to any endpoint in your Mule config.
  • Dynamic Endpoints – Endpoints in Mule are now fully dynamic which means expressions can be used to read endpoint information such as host or port from the current message.
  • Message Exchange Patterns – (a.k.a. MEPs) give you more explicit and flexible control over the way messages flow through Mule. For example, you can now specify whether you expect a response on a given endpoint or not (see the new attribute “exchange-pattern” on endpoints). In the future, we may introduce additional exchange patterns that allow for different communication styles as well.
  • Message Property Scoping – Message properties are now scoped in either ‘inbound’, ‘invocation’, ‘outbound’ or ‘session’ scope. These scopes provide isolation and consistency to the way properties are attached to inbound and outbound messages.
  • Lifecycle Improvements – Improves behaviour during startup and shutdown of applications, a very important aspect of hot deployment. We have also added support for JSR-250 lifecycle annotations @PostConstruct and @PreDestroy.
    Exception Handling – Exception strategies were simplified to provide more consistent and predictable error-handling behavior.
  • Automatic Transformation – The transformation engine has been enhanced to support Data bindings such as XML/JAXB and JSON/Jackson. Also Mime types are now supported when discovering transformers.
  • Transaction Enhancements – Mule has always supported XA transactions but now a dedicated element has an attribte that tells Mule to pay attention to (or ignore) transactions started outside of Mule.

Migration Path

With any major software upgrade there are going to some migration issues. We worked very hard to ensure that the migration impact would be minimal. We kept backward compatibility with almost all service elements and endpoint elements. All other elements of the Mule configuration remain backward compatible. See the full list of every change from Mule 2.2 to Mule 3.

We did make some big changes in Web Services in order to make them easier and more flexible. This required an overhaul of the CXF module so if you are using Web Services you’ll need to familiarise yourself with the changes. I think you’ll agree the new way of doing things is much simpler.

Feedback

The best thing about Mule has always been the open source community, we wouldn’t be where we are today without the great feedback, suggestions and bug reports that we get from our users. As we move forward with Mule your feedback is invaluable; after all it shapes our future releases. Please grab Mule 3, take it for a ride and let me know what you think (good or bad). You can either ping me directly ross at mulesoft dot com or use the community mailing list / forums.

Make sure you visit our blog frequently over the next few weeks as the team will be exploring each of these features in more depth.

No related posts.


20 Responses to “Say Hello to Mule 3”

Keith R. McFarlane September 15th, 2010, 5:25 pm

Congrats on the release — I’m looking forward to digging in!

Blog post in which I summarize my early Mule 3 thoughts/hopes/dreams: http://bit.ly/cShZH9

Bernie September 15th, 2010, 10:07 pm

Cool guys! several new features are really what i expected. Tks!

Eric Rich September 16th, 2010, 11:52 am

Neat stuff! Looks like some really useful additions. Congrats!

Nirav Naik September 17th, 2010, 2:22 am

One up to what Bernie said…

Looking forward to solve following…

http://forums.mulesoft.org/thread.jspa?threadID=3776&tstart=0

Mule jumps on cloud computing bandwagon | CTOlabs September 17th, 2010, 8:43 pm

[...] public cloud Open source-friendly software project Mule has joined the cloud bandwagon. The Mule 3.0 release now supports public cloud infrastructures like Amazon Web [...]

Dimitris Manikis September 19th, 2010, 8:04 am

Well done MuleSoft people!!!

Ross Mason September 29th, 2010, 5:35 am

Hi Nirav,

Dynamic endpoints are now supported in Mule 3. See: http://www.mulesoft.org/documentation/display/MULE3USER/Configuring+Endpoints

The issue you are hitting is that in Mule 2.2 endpoints must confirm to the URI specification and even the Template URIs had to confirm to that spec. In Mule 3 we introduced a better approach to this. Not that the URI scheme in Mule 3 cannot be templated this is because endpoints can have surrounding configuration specific to the protocol scheme, so if you need to switch scheme as well, use a filtering router with dynamic endpoints.

From the Mule’s Mouth » Blog Archive » Ross Mason talks Mule 3 October 8th, 2010, 6:01 am

[...] }); }Mule 3 was recently announced, bringing significant new features to the open source Mule ESB and reaffirming it as the most [...]

Michael Stöckler October 27th, 2010, 3:57 am

Hello Ross,

I was really looking forward to try out the new @Transformer Annotation. This just feels like the right way to write Transformers. Unfortunately i was not able to use it. Is this is implemented in Mule 3? It seems to me that annotated transformers are not registered! Are there any prerequisites?

Ross Mason October 28th, 2010, 5:28 am

Hi Michael,

Today you need still register the annotated classes as spring beans. i.e.

We intend to scan for them automatically, but scanning every class for method annotations is costly so we are introducing a way to limit the search to either the scope of the application or particular packages. This behaviour will be configurable via something like a scan.packages property in the mule-app.properties.

Ross Mason October 28th, 2010, 5:31 am

Hi Michael, the XML snippet in my reply got removed, see this instead, its just a single line to register the transformer class: http://pastebin.com/JG8PiCxT

From the Mule’s Mouth » Blog Archive » Announcing Mule 3.0.1 November 12th, 2010, 7:56 am

[...] team is please to announce the availability of Mule ESB 3.0.1.  This is a follow-up release to Mule 3.0.0, which continues MuleSoft’s commitment to making Mule the industry’s most powerful, [...]

Ayyappan Gandhirajan November 16th, 2010, 3:02 am

Congrats guys! I want to really try with the new Mule 3.0!!

Can Barışcan November 25th, 2010, 2:04 pm

Great set of features and great vision. Just from this page I get the vision that you guys have done great work, and I hope to get Mule accepted for our Telco project.
Congrats!

Edward December 10th, 2010, 4:12 pm

Hi,

when are we expected to have Mule 3 enterprise

Mateo Almenta Reca December 13th, 2010, 9:32 am

Edward, we are planning to release Mule ESB 3.1 Enterprise shortly. Stay tuned.

Mateo

Davy December 16th, 2010, 11:18 pm

Congratulations! Hot deployment …That’s really cool~ How can I realize that with Mule

Pankaj January 6th, 2011, 11:40 am

This looks super cool, am confident will be fun using these new changes.

Leave a Comment