Sunday, September 12, 2010

Application Echo: Common Bi-directional Synchronization Side Effect

You set up 2 integration flows running in opposite directions that capture change events in 2 applications and replicating it to the other. Sounds easy enough, till you deploy the integrations and make a single change in one application. The 1st integration flow gets notified of the change and updates its target application. As a result, the 2nd integration flow gets notified of the change and updates its target application. Which causes the 1st integration flow to see the change....so on and so forth till you finally pull the plug and break the cycle. How do you stop this infinite application echo from happening?

You can implement a method which queries the target system 1st to see if the data in the target is different from the source and only apply the update if it is. While this seems like a good approach, it's not very efficient. It requires an additional query and field by field comparison for each integration flow which can be the cause of performance issues and can certainly put additional load on the target applications.

A simpler and less costly method would be to create specific user credential on each application that is only used by the integration flows to login. When an update triggers the flows, a simple check to see who last modified the record will let the process know to proceed or to stop.