views:

876

answers:

3

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?

+6  A: 

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.

Corehpf
I was able to get Mule working with the project without *too* much trouble, though it does seem to pull in most every jar imaginable. When I finally got the right incantations in place, the impact on my code was pretty minimal, which is good, but the documentation wasn't great for integrating Mule into an existing webapp. I still don't have a feel for whether it will be worthwhile, but I now have a means of determining that. Thanks.
Tim
+2  A: 

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.

Ken
+3  A: 

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.

Aswin
Funny you should mention that as I am evaluating Camel right now as a potential option instead of Mule as it does seem to be more lightweight. I have not made any decisions yet, but it does seem that it might give me what I need without as much overhead.
Tim