Monthly Archives: April 2015
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:
- 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”?
- How these systems will understand data? Data transformation –should we write converters for all the permutation combination of data formats?
- 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?
- 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:
- 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
- How to connect to FTP server by passing just the connection credential –not a single line of input output code
- Interact with JMS –again using adapters from spring and not custom code
- Send out emails
- Get feeds from twitter
- Triggering, Controlling and Monitoring Batch jobs
- Managing the performance of sporing integration components
- You will find code for each scenario which is executable –and at end there is an end to end real time scenario implementation