Question

I'm looking at integrating an ESB into an existing Java/Maven web based product. Specifically, I'm looking at ServiceMix and Mule. The product will connect to several different services, including email, Quartz, RESTful webservices over HTTP, SMS and IM. I've only quickly glanced at the documentation and the two options seem to be pretty heavyweight and fairly complex. It seems like a textbook example of when to use an ESB, but I don't want to spend a great deal of time just learning one or the other system.

Like I said, I already have a web app built by Maven and was hoping integrating one of the systems would be fairly straightforward, even just for something as simple as sending an email, but it looks like adding either will pull in half the world in terms of jars and would be hard to embed in the existing product.

Is it worth trying to pull in one of these options? Is there an easy way of integrating them into an existing app without completely restructuring it? Are there other, lighter weight options? Are there some aspects that I should consider that would make their use worthwhile?

Was it helpful?

Solution

Mule is quite simple to use in terms of plugging services together with XML and they have plenty of video examples which I found really helpful.

ESBs are supposed to be future and as you say - yours does seem like a textbook example of where to use it.

I'll try to answer all your questions:

Is it worth trying to pull in one of these options? I think this is a question you need to ask yourself - what are you trying to achieve? if you're trying to make it easier to implement it will probably take the same time via pure code or ESB what with all the setup included. If you're thinking of doing it as a learning exercise it may be worthwhile.

Is there an easy way of integrating them into an existing app without completely restructuring it? Short answer no. You will require some re-engineering to integrate with most third-party libraries/frameworks.

Are there other, lighter weight options? Mule is quite simple really. You might be able to use an MQ to do the HTTP, SMS and IM. Possibly ActiveMQ or RabbitMQ.

Are there some aspects that I should consider that would make their use worthwhile? Yes, ESBs are designed for enterprises where new services are added often and the configuration is likely to change. Having it all in XML makes this change a bit easier. So if you are just building a one-off piece of software it might not be the right way to go. But if you will be adding more later and constantly connecting different services it may be the best route.

OTHER TIPS

You may also want to take a look at Apache Camel framework which is really powerful for all the integration needs you mentioned without the penalties of a full blown ESB.

Ross Mason, the founder of the Mule project wrote a really good article on this topic, To ESB or Not to ESB. I recommended taking a look at it. Also, you may want to check out Mule iBeans which offers a much simpler model if you are building this as a web app and just want to do some lightweight integration and are not interested in mediation.

I advice not to waste your valuable time with MULE. My experience so far isn't good. I wouldn't use it for any critical system. It's far away from being a mature product. Apart from that RESTful services definitely promise a lot of simplicity and has real use cases.

I would say that it is worth the investment if you have more than two applications or databases that need to talk to each other AND they are using more than one communication protocol. Or, if you expect this situation to be true in the future. Sounds like your requirements certainly fits this.

Another situation that would suggest the use of an ESB or at least a message bus would be where you expect or need one or more of the applications to evolve independently of the others. For example one is under active development and the others are not. An ESB can isolate the stable systems from changes in the actively developed systems removing the need to always be updating everything.

The true power of an ESB is that applications can delegate all decisions about how to communicate and whom to communicate with to the ESB and let that component take full responsibility for those aspects. All other components become isolated from each other and need not worry about each other greatly reducing problems of combinations of dependencies.

In terms of the learning curve I have found Mule ESB to be fairly straight forward to pick up and would certainly be a much lower learning curve that trying to learn all the required APIs to talk the the multiple services that you are trying to connect to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top