REAL STORIES
BY REAL PEOPLE Search
Saturday, October 21, 2017

Which Integration Framework Is Right For Your Business?

by Kaushal Shah (writer), , January 25, 2017

Credit: Which Integration Framework Should You Use?
Which Integration Framework Should You Use?

Spring Integration, Mule ESB, and Apache Camel are three most widely used integration frameworks. Checkout the comparison to see which is the best fit for your business.

In the current age of digital transformation, many applications use multiple types of data which are exchanged frequently between different apps. To interface such data, software & website development companies use different technologies, protocols and data formats, making it fairly complex to integrate and deliver a standardized architecture to make sense out of the data. Currently, there are primarily three integration frameworks which are widely used in the JVM environment to fulfil the above requirements. They are Spring Integration, Mule ESB and Apache Camel. The frameworks follow Enteprise Integration Patterns (EIP) and therefore offer a standardized, domain-specific language to integrate applications.

The integration frameworks can be used for almost every integration project within the JVM environment – no matter which transport protocols or technologies or data formats are used in the application. Once you hire a java programmer, all integration projects can be realized in a consistent way without redundant boilerplate code. This article compares the three alternatives and highlights their pros and cons.

First, let’s understand the 13 comparison criteria used to evaluate the three integration frameworks:

  1. Open source – for licensing
  2. Basic concepts / architecture – to best fit your JVM environment
  3. Testability – how good are they?
  4. Deployment – how easy are they?
  5. Popularity – how big is the community?
  6. Commercial support – types of support offered
  7. IDE-Support – types of IDE’s supported
  8. Errorhandling – how good is it?
  9. Monitoring – how efficient is it?
  10. Enterprise readiness – is it ready for your business?
  11. Domain specific language (DSL)
  12. Number of components for interfaces, technologies and protocols
  13. Expandability – is it scalable?

Next, let’s look at the similarities between the three integration frameworks:

  1. All three frameworks implement EIPs and offer a consistent model and messaging architecture to integrate several technologies
  2. They follow common syntax – meaning which technologies you use, always implement it in the same way
  3. Each framework uses different names, but the idea is the same, for e.g. “Camel routes“ are equivalent to “Mule flows“, “Camel components“ are called “adapters“ in Spring Integration
  4. You need to add some libraries to your JVM’s classpath for using each framework, for e.g. if you want to deploy Java SE to a web container (e.g. Tomcat), you need to add the libraries, execute simple configuration, and you are done with integration
  5. All three frameworks are open source and offer familiar, public features such as source code, forums, mailing lists, issue tracking and voting for new features
  6. They are supported by good communities that write documentation, blogs and tutorials (IMO Apache Camel has the most noticeable community)
  7. Commercial support is available as per the preferred vendor:
  8. Spring Integration: SpringSource (http://www.springsource.com)
  9. Mule ESB: MuleSoft (http://www.mulesoft.org)
  10. Apache Camel: FuseSource (http://fusesource.com) and Talend
  11. IDE support is good, with easy visual designers for all three to model integration problems
  12. Each of the framework is enterprise ready with features such as error handling, automatic testing, transactions, multithreading, scalability and monitoring

If you know one of the frameworks, then you can learn the others very easily, as they follow the same concepts. The two most important differences among the three integration frameworks is the number of supported technologies and the used DSL(s). We will focus on these two criteria and will use code snippets implementing the well-known EIP “Content-based Router“ as examples.

Spring Integration – It is based on Spring project and extends the programming model with integration support. You can use Spring features such as dependency injection, transactions or security as you do in other Spring projects. It is almost no effort to learn Spring Integration if you know Spring itself and have implemented Spring in your project. It offers very rudimenary support for technologies – like File, FTP, JMS, TCP, HTTP or Web Services. Mule and Apache Camel are far better in terms of offering many further components!

Integrations are implemented by writing a lot of XML code (without a real DSL), as shown below:

id=”receivingOrders”

directory=”file:receivingOrders”/>


channel=”GameCDOrders” />


id=”CDOrders”

directory=”CDOrders”/>


id=”GamesCDOrders”

destination=”GamesCDOrdersQueue”

channel=”GamesCDOrders”/>

You can use Java code, but XML is the right language. We recommend to use Spring Integration if you are working on an existing Spring project and must just add some integration logic requiring for File, FTP, JMS or JDBC components.

Mule ESB – It is a full ESB including several additional features apart from being an integration framework. Mule can be used as a lightweight integration framework. Compared to Spring Integration, Mule only offers a XML DSL. It is much easy to read than Spring Integration and Mule Studio offers a very good and intuitive visual designer. Let’s compare the following code with the Spring integration code from above.

evaluator=”groovy”>

evaluator=”groovy”>

queue=”GameCDOrdersQueue”/>

The major advantage of Mule is its availability of connectors with SAP, Tibco Rendevous, Oracle Siebel CRM, Paypal, IBM’s CICS Transaction Gateway. One disadvantage of using Mule is its lack of support for OSGi.

Apache Camel – It is almost identical to Mule, offering more components compared to Mule which is fit for every technology. If the component is not available, then you can create your own very easily starting with a Maven archetype! If you are a Spring guy, Camel has awesome Spring integration. It also offers a XML DSL:

${in.header.type} is ‘com.kw.cdOrders’

${in.header.type} is ‘com.kw.GameCDOrder’

Apache Camel’s readability is far better compared to Spring Integration. Camel uses a lot of XML, making it a bit difficult and complex to understand. Therefore we will use its another awesome feature: DSLs for Java, Groovy and Scala. Now you do not have to code so much using XML. Below you can see the same example using a Java DSL code snippet:

from(“file:receivingOrders “)

.choice()

.when(body().isInstanceOf(com.kw.CDOrder.class))

.to(“file:receiving/CDOrders”)

.when(body().isInstanceOf(com.kw.gamecdOrder.class))

.to(“jms:gamecdOrdersQueue “)

.otherwise()

.to(“mock:OtherOrders “);

DSLs are very easy to read (even in more complex examples) and are IDE friendly. By the way: Talend also offers a visual designer generating Java DSL code, but it generates a lot of boilerplate code.

Conclusion

All the above three integration frameworks are lightweight, easy to use – even for complex integration projects and are awesome to integrate with several different technologies reusing the same syntax and concepts with testing support. We nominate Apache Camel due to its awesome Java, Groovy and Scala DSLs, combined with many supported technologies. Rishabh Software is an enterprise integration partner, helping many organizations achieve integration flexibility and scalability. We solve your complex integration problems and simplify the application architecture. And last thing, always remember: A fat ESB has too much functionality, increasing the complexity and efforts. Use the right tool for the right job!

Did you consider any other integration frameworks apart from the ones mentioned above? Let us know your thoughts in the comments below.



About the Writer

Kaushal Shah is a writer for BrooWaha. For more information, visit the writer's website.
Want to write articles too? Sign up & become a writer!

0 comments on Which Integration Framework Is Right For Your Business?



Add A Comment!

Click here to signup or login.


Rate This Article


Your vote matters to us



x


x