Monthly Archives: April 2015

What is spring integration and how can it help solve enterprise integration challenges


Over past couple of years I have been heavily involved with enterprise integration. Have worked with content management applications, enterprise telephony and many other domains –one of the key challenges faced by me is interaction and integration with external systems. Let me explain a bit, in an era of “as a service” model, an application need to integrate with n number of heterogeneous system to come in totality. Let’s take a quick example, typically new publishing might source content from one vendor, images from Instagram account, social feeds from Twitter/Facebook etc. As you might have observed –these systems are “totally” disconnected. To emphasize my point –while developing these module no one might have an idea that it could be even useful for others! Obvious enough that when we try to integrate these we will run into a hell lot of issues, let’s try to bullet out a few:

  1. How to interact with the other module? Shared file, shared DB, HTTP protocol, proprietary protocol –the list is endless, should we sit down and write all of these “Adapters”?
  2. How these systems will understand data? Data transformation –should we write converters for all the permutation combination of data formats?
  3. Definition of failure is always subjective –some will log it and ask user to try next time while other may rollback all previous step. How do we deal when we have to integrate system which follow different paradigm for failure?
  4. Rate of processing – areal time application may churn data pretty fast, what if the consumer is slow? How do we deal with that?

These are just a sneak peek in issues which I face every day. And not only me, but tons of developer out there –can we say it as an era of service integrations! And what happens when a mass faces similar kind of issue –yep, we develop frameworks, tool, so that it can be reused.
In the mess of inequality, we need a sort of mediator which can orchestrate the interaction. If all is successful – well it’s nice, but if something goes wrong –it also brings them on last stable state! And this where enterprise integration patterns gains its relevance. There are many implementations of these patterns –ApacheCamel, Spring Integration etc., but I have primarily worked with Spring Integration. Reason, we have existing Spring ecosystem, its very lightweight, does not need a separate process space, and over all very easy to use and integrate.

I have written a quick “getting started” blog on spring integration and then to further share my experience with this topic, I have jotted down, basic theory, real time issues and their ready to implement code in a book “Spring Integration Essentials” available at amazon and packtpub.
It’s not a theory book –rather “learn by example” and you will find running code for real time scenarios. Some quick examples:

  1. How to transform message from one format to other –for example XML to a java bean; key is without writing explicit code –instead suing the components from spring integration
  2. How to connect to FTP server by passing just the connection credential –not a single line of input output code
  3. Interact with JMS –again using adapters from spring and not custom code
  4. Send out emails
  5. Get feeds from twitter
  6. Triggering, Controlling and Monitoring Batch jobs
  7. Managing the performance of sporing integration components
  8. You will find code for each scenario which is executable –and at end there is an end to end real time scenario implementation

Check it out at amazon and packtpub. , and code samples at Github -please free to connect with me for any clarification or issues

Advertisements