If you are in the SOA space, by now you would have heard of Mule, an open source ESB solution from MuleSource. The company business model is certainly interesting…
Mulesource offers 2 versions of their ESB product, an enterprise edition (EE) which attracts an annual fee that entitles you to product updates and bug fixes and a community edition which is freely available at muleforge.
it is interesting that the enterprise edition comes with no source code, other than the test code for the examples packaged, which does make it difficult to understand the framework. One the other hand, the community edition sports the full package of source code for the framework, including the source code for the examples, which makes it a whole lot easier to follow and understand.
Now the technical details!
The mule ESB runs in its own jvm instance, the entry point in their source code is MuleServer, this is where main() is declared, from there, it loads the configuration file, the default being “mule-config.xml”, unless specified with something else.
Now here comes the value proposition of mule, let’s imagine you need to create a service, you define the service interface with the method declarations (service contract it needs to fulfill). Then you implement the actual service by implementing that interface and the Mule Callable interface. Keeping in mind we are still in java land, nothing on the ESB yet
Now in your mule-config.xml, you declare the <mule-descriptor/>, that matches your concrete service class, and the inbound router with associated end-points. Here you can use any type of transports you like, jms, http whatever. You then do the same thing with the outbound router.
So the architecture at this stage is:
application “A” -> inbound router -> outbound router -> application “B”
applications can tap into any of the end-points you declare in the inbound router, and the associated response from the service component to the outbound router.
The Server Side did a case study on mule early 2007, although slightly out of date, but still relevant, here is the link for it. I think it explained far more clearly than me
I will try to see if I could give you a better example I created myself, so stay tuned!
~pali