Scattered Parasitic Functionality

Written by

in

Description

Multiple services are responsible for the same concern and some of these services are also responsible for orthogonal concerns.

Context

Derived from: “Scattered Parasitic Functionality”
That a single concern is split among multiple services and that at least one service handles multiple orthogonal concerns violates important service-oriented principles. This means that these concerns infect services with another orthogonal concern, like a parasite.

Cause

It may be a tempting shortcut to distribute a concern over several existing services.

Consequences

Modifiability, reusability, and testability may be reduced. Changing a scattered shared concern requires the changing and testing of several services. The shared concern also cannot be efficiently reused.

Detection

In the realm of EA, we interpret a concern as a function or a goal. We identify this Smell in the ArchiMate model in two ways. First, in the literal sense, we are looking for Application Components responsible for the same function. Besides, at least one of them also performs some independent functions. Second, by looking at the analysis elements called Assessments that emerge from stakeholder concerns. Each Assessment should deliver a goal. If two Assessments influence the same goal and one of them also addresses other goals at the same time, then this can also be a sign of the Scattered Parasitic Functionality Smell in ArchiMate.

Solution

Implement a monitoring connector to exchange the data or the status of the data.

Example

Service A has a SharedConcern. Service B and C also have this shared concern, but also an orthogonal concern ConcernB respectively ConcernC.

Cypher query

MATCH (a)-[r:AssignmentRelationship|AssociationRelationship <br /> |InfluenceRelationship|RealizationRelationship]-(b) <br /> WHERE (a:ApplicationFunction OR a:ApplicationService OR a:Goal) AND <br /> (b:ApplicationComponent OR b:Assessment) <br /> WITH a, COUNT (b) AS compCount <br /> MATCH (a)-[r:AssignmentRelationship|AssociationRelationship <br /> |InfluenceRelationship|RealizationRelationship]-(b) <br /> WHERE (b:ApplicationComponent OR b:Assessment) AND  compCount>1 <br />WITH a, b <br /> MATCH p = <br /> (a)--(b)-[r:AssignmentRelationship|AssociationRelationship|InfluenceRelationship|RealizationRelationship]-(orthogonal) <br /> WHERE a<>orthogonal and (orthogonal:ApplicationFunction or orthogonal:Goal) <br /> RETURN p

Cypher count query

MATCH (a)-[r:AssignmentRelationship|AssociationRelationship <br /> |InfluenceRelationship|RealizationRelationship]-(b) <br /> WHERE (a:ApplicationFunction OR a:ApplicationService OR a:Goal) AND <br /> (b:ApplicationComponent OR b:Assessment) <br /> WITH a, COUNT (b) AS compCount <br /> MATCH (a)-[r:AssignmentRelationship|AssociationRelationship <br /> |InfluenceRelationship|RealizationRelationship]-(b) <br /> WHERE (b:ApplicationComponent OR b:Assessment) AND  compCount>1 <br />WITH a, b <br /> MATCH p = <br /> (a)--(b)-[r:AssignmentRelationship|AssociationRelationship|InfluenceRelationship|RealizationRelationship]-(orthogonal) <br /> WHERE a<>orthogonal and (orthogonal:ApplicationFunction or orthogonal:Goal) <br /> RETURN COUNT (DISTINCT a)

Diagram

Diagram for Scattered Parasitic Functionality

Tags

microservices, soa, business, application, technology, abstraction, The Couplers

Related smells

All smells