Connector Envy

Written by

in

Description

Services implement large amounts of low-level interaction-related functionality, e.g. for communication, coordination, conversation, or facilitation. These functionalities should be implemented by a connector instead.

Context

Derived from: “Connector Envy”

Cause

Performance may have been preferred over maintainability, since separation of connector and service functionality would create an additional level of indirection.

Consequences

Reusability is reduced, because these low-level details are too specific and not agnostic enough. Understandability is reduced, because different concerns are mixed. Testability is reduced, because the connector and service functionality cannot be tested separately.

Solution

Extract the interaction-related functionality into a separate connector service.

Example

Service A implements communication and facilitation services. It also makes use of a communication component, which means that it manages networking facilities for remote communication. But the delivery and routing services handled by the remote communication are a type of facilitation service

Tags

microservices, soa, business, application, technology, abstraction

Related smells

All smells