FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
SOA Web Services Blog: Coupling - good? bad? how much?
XML & Web Services
<![CDATA[[

Web Services and Smart Data.

by John Dorsey
THE SOFTWARE SIMPLIST

Web Services Wisdom.

by Udi Dahan
May 20, 2006

Coupling - good? bad? how much?

One of the technical advantages touted by SOA proponents is that it will result in looser coupling between systems/services. Of course, they haven't agreed among themselves what a service actually is so that statement is kind of amusing. In fact, loose coupling has become something of a buzz word in its own right. The only reason more people aren't talking about it is that it had the misfortune to come out roughly around the same time that SOA did.


So, what is this "coupling" thing and why does it matter so much?

Coupling is a pseudo-technical term used to measure the subjective inter-connectedness of two things. Loose coupling meaning that the two things aren't very inter-connected. Inter-dependence is another way of looking at it. If we have two things, A and B, and A cannot function without B, then we can say that A is coupled to B. Of course, this does not necessarily mean that B is coupled to A.

And the reason this matters has to do with money. In the previous example, if I find a bug in B and fix it, that might cost me X. However, later I find out that A began to malfunction as a result of that bug fix, possibly code in A depended on the buggy behavior of B. Now the cost has increased: the cost of the malfunction of A, the cost of finding what's wrong in A, the cost of fixing A, and the cost of rolling out the system again need all be added to the original cost of fixing the bug in B. All this would remain true if we were talking about changing or enhancing B's functionality - the bugs would only pop up in A.

Therefore, it is clear that making any kind of changes to a system whose elements are tightly coupled will cost more than making those same changes to the same system designed of loosely coupled elements.

The cost stated above don't take into account the cost of time - lost opportunities in business. In this day of business reliance on technical infrastructure, the business can only be as agile as its infrastructure. Meaning that coupling has a direct impact not only on the bottom line, but on the company's tactical and strategic capabilities.

Of course, coupling can't entirely be done away with. Business needs to have data from Sales available to Marketing, and so the corresponding systems need to work together. Coupling is as inherent in technical systems as it is in business. However, different application-level communication protocols have different levels of coupling. If, for the simplest piece of data, system A needed to access ten different parts of system B, instead of one, that would increase the dependence of A on B. It is this that we must strive to minimize in our technical architectures.

Posted by Udi Dahan at 05:23 PM  Permalink




 
INFO-LINK