Loose coupling

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Loose coupling describes a resilient relationship between two or more systems or organizations with some kind of exchange relationship. Each end of the transaction makes its requirements explicit and makes few assumptions about the other end. The notion of loose coupling is found in computer systems, and was introduced into organizational studies by Karl Weick.

Contents

[edit] Loose coupling in computing

In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules

Loosely coupled systems are considered useful when either the source or the destination computer systems are subject to frequent changes.

[edit] Definition

Loose coupling describes an approach where integration interfaces are developed with minimal assumptions between the sending/receiving parties, thus reducing the risk that a change in one application/module will force a change in another application/module.

Loose coupling has multiple dimensions. Integration between two applications may be loosely coupled in time using Message-oriented middleware, meaning the availability of one system does not affect the other. Alternatively, integration may be loosely coupled in format using middleware to perform Data transformation, meaning differences in data models do not prevent integration. In Web Services or Service Oriented Architecture, loose coupling may mean simply that the implementation is hidden from the caller.

Loosely coupled services, even if they use incompatible system technologies, may be joined to create composite services, or disassembled just as easily into their functional components. Participants can establish a shared semantic framework to ensure messages retain a consistent meaning across participating services.

[edit] Alternate definition

Loose coupling also describes a computer system where two or more physical processors are sharing storage disks with each other in a real time environment. The system must be designed such that the code to be shared is reentrant and that the records to be shared are protected by record locking.

[edit] Measuring coupling

The degree of loose coupling can be measured by noting the number of changes in data elements that could occur in the sending or receiving systems and determining if the computers would still continue communicating correctly. These changes include items such as:

  1. new data elements being added to messages
  2. data element order being changed
  3. names or structures of data elements being changed
  4. data elements being omitted

[edit] Methods for decreasing coupling

Loose coupling of interfaces can be dramatically enhanced when publishers of data transmit messages using a flexible file format such as XML to enable subscribers to publish clear definitions of how they subsequently use this data. For example, a subscriber could publish the collection of statements used to extract information from a publisher's messages by sharing the relevant XPath expressions used for data transformation. This would allow a responsible data publisher to test whether their subscriber's extraction methods would fail when a published format changes.

Loose coupling of services can be enhanced by reducing the information passed into a service to the key data. For example, a service that sends a letter is most reusable when just the customer identifier is passed and the customer address is obtained within the service. This decouples services because services do not need to be called in a specific order (e.g. GetCustomerAddress, SendLetter)

Note that loose coupling is not universally positive. If systems are de-coupled in time using Message-oriented middleware, it is difficult to also provide transactional integrity. Data replication across different systems provides loose coupling (in availability), but creates issues in maintaining synchronisation.

[edit] Loose coupling in organizations

The notion of loose coupling was introduced into organizational studies by Karl Weick. In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules

[edit] See also

[edit] References

  • Loosely Coupled: The Missing Pieces of Web Services by Doug Kaye
  • Service Oriented Architecture: A field Guide to Integrating XML and Web Services by Thomas Erl
  • Karl Weick, "Educational organizations as loosely coupled systems", Administrative Science Quarterly, 21 (1976), 1-9 (part).
  • "The Management of Organizational Change among Loosely Coupled Elements" (1982) by Karl Weick reprinted in his book Making Sense of the Organization (2001)
  • James Douglas Orton and Karl E. Weick, Loosely Coupled Systems: A Reconceptualization, Academy of Management Review 15 (2):203-223 1990

[edit] External links

Personal tools
Languages