Few applications are entirely self contained, and even less so in the Cloud. When you have more than one piece to an application, the pieces are going to have to talk to each other. Unfortunately it is not always so quick and easy to implement a direct connection between two pieces. Legacy code, long development cycles, obscure communication protocols, 3rd party solutions, and political obstacles can conspire to isolate components. To help connect up and manage communications between and within applications you can construct one or more "Enterprise Service Buses", or ESBs.
The ESB’s job in the infrastructure is to facilitate communications between all sorts of things. It will have a Swiss Army Knife’s worth of connectors, adapters, communication protocols, and translation and transformation capabilities. It should be relatively easy to connect up these parts and wire practically anything to anything else. They usually include a menu of data flow controls to route, trigger, intercept, and log the message traffic.
You can also leverage an ESB as a tool for keeping track of where everything is. When something in the infrastructure moves which may have a number of other things it communicates with; you could update everything, one piece at a time, and hope you got them all, or you could just update the ESB. Simpler, centralized administration can be a big win when you are in a highly dynamic cloud environment.
You can configure a set of ESB servers behind a load balancer, so you can move them too. You can even use an ESB as a sort of load balancer for some odd protocol or another. There are a number of possible architecture configurations and you may want to implement more than one of them within your cloud.
Some ESB technology is embeddable in your application. Rather than connecting to a stand-alone ESB server, you could set up an ESB service within your application for internal and external data exchanges.
The advantage of an Open Source ESB solution is that you can extend and customize the tool as needed. The very nature of an ESB, which must be a flexible interconnector and data router, means that you will probably want to extend and customize it to glue together some odd connection here or there. There are several Open Source ESB solutions to choose from, here are a few, all of which are backed with optional commercial support:
OpenESB just put out their first release candidate for their first version of an ESB. They have a really impressive website and feature set. These guys are going to be major players in this space in the not too distant future.
JBoss ESB seems to be somewhat disorganized and struggling to gain traction. It is difficult to approach without a good understanding of JBoss. Data routing and transformations can get surprisingly complex and convoluted very quickly. I think it is important that an ESB implementation be as clear and simple as possible so as to not make things even more confusing. My first impression was that the JBoss solution would not lend itself well to clear and simple implementations.
Why are there two Apache ESB’s? I have no idea. Both seemed somewhat dated and not as comprehensive as OpenESB or Mule. I get the sense there was a split in the community and that the rivalry did neither product justice. They were sufficiently lacking in obvious support for a few key communication protocols that I spent little time evaluating them further.
Mule is fairly mature (the whole concept of an "ESB", as such, is still fairly new). Some of the key brains behind Mule are some of the pioneers of ESB development. Mule recently released version 2 (and quickly buried version 1). Version 2 is still a little buggy but it is getting better every day and the bugs are increasingly obscure. (Version 2.1.2 was just released this week.) The documentation varies from extremely sparse and obtuse to very detailed and clear. Free support from the user forums is not bad. Business Critical ESB owners should probably leverage one of the commercial support options.
Terminology varies depending on the ESB solution you are working with. Not only are they likely to use different terms to describe the same function but they sometimes use the same terms to describe different things. (!)
All of them follow the same basic flow structure. Data comes in, runs through some business logic, and goes out. Flow variations can include self-triggered data (via timers), externally triggered data, data flow triggered data, multi-casting, inbound data aggregation, outbound data aggregation, sequential processing, reverse or custom reply paths, combinations of things, and fragments.
The key to a successful ESB implementation is to keep things as clear and simple and easy to understand as possible. Lots of drawings and supporting documentation can really help, not just to communicate what is happening to others, but to get it straight in your own head. As this blog matures I’ll post a few ESB tricks and tips, links to new and interesting developments in the ESB world, and links to articles with particularily relevant and thought provoking discussions. Stay tuned!