Jake
Jake

Reputation: 16837

Loosely coupled web services

I am trying to find out what does it actually mean when we refer to web services as being loosely coupled ?

An old article I found implies loosely coupled to be related to asynchronous messaging.

Wikipedia's definition of loose coupling indicates the components have minimal inter-dependency.

Can some one please tell a concrete explanation of loose coupling in context of web services ?

Upvotes: 1

Views: 4208

Answers (1)

Nick Vasic
Nick Vasic

Reputation: 1896

In short, web Services are referred to as being loosely coupled if:

  1. The state of the web service does not depend on the state of the web service consumer, and vice-versa. In other words, the web service is not concerned with the internal workings or a specific state of the consumer, and vice-versa.

  2. The communication between the web service consumer and the web service is performed via a well-defined set of interfaces, and the response is always checked to ensure that the web service has completed successfully. The web service consumer does not trust that the web service performed its job correctly by any means other than the validation of the response against what it was requested to do.

How can a web service become tightly coupled with the consumer?

For example, if a web service modifies the same back-end data store that is also subsequently queried by the consumer. In this case, the failure in the internal execution of the web service could have an effect on the execution of the consumer. The common state (in this case the data store) is being shared by the consumer and the web service.

Please see the following link for further discussion: Tight-coupling Web services

Upvotes: 3

Related Questions