Home > Design Patterns > Capability Composition
Capability Composition

Capability Composition (Erl)

How can a service capability solve a problem that requires logic outside of the service boundary?

Problem

A capability may not be able to fulfill its processing requirements without adding logic that resides outside of its service's functional context, thereby compromising the integrity of the service context and risking service denormalization.

Solution

When requiring access to logic that falls outside of a service's boundary, capability logic within the service is designed to compose one or more capabilities in other services.

Application

The functionality encapsulated by a capability includes logic that can invoke other capabilities from other services.

Impacts

Carrying out composition logic requires external invocation, which adds performance overhead and decreases service autonomy.

Capability Composition: The individual capabilities of services can be aggregated to collectively help solve the large problem from which they were originally derived.

The individual capabilities of services can be aggregated to collectively help solve the large problem from which they were originally derived.