CQRS and materialized views
Instead of composing at request time, a system can keep a precomputed read model that is updated as events arrive. Reads are faster and survive a source outage, at the cost of maintaining a copy.
Glossary
API composition is a pattern in which one API operation calls several underlying services or systems and combines their results into a single response. The consumer makes one request, and the composer handles the order of calls, the joining of data, and what to return if a dependency fails.
In more detail
The pattern is best known from microservices design, where data that used to sit in one database is split across services and a query has to gather it again. A composer, sometimes an API gateway and sometimes a dedicated service, calls each owner of the data and joins the results in memory. The same idea applies to enterprise systems, where one business answer may need an ERP, a CRM, and a logistics platform. The hard parts are the same in both: latency, partial failure, and consistency between sources read at slightly different times.
Example
A consumer asks for an order summary by order identifier.
The composer reads the order from order management, then reads fulfilment and carrier status in parallel.
It returns a single result. If the carrier does not answer in time, it returns the rest and marks the delivery part as unavailable.
Related terms
Instead of composing at request time, a system can keep a precomputed read model that is updated as events arrive. Reads are faster and survive a source outage, at the cost of maintaining a copy.
A backend-for-frontend composes calls for one application's screens. A composed API built for reuse serves several consumers.
Orchestration means a central coordinator directs the calls, as an API composer does. Choreography means services react to each other's events with no coordinator.
Questions
In Apyrn One
The Apyrn One capability for publishing one business operation that draws on several systems, with ownership, versioning, and policy.
Learn moreA Business API accelerator that composes order context from several systems behind one contract.
Learn moreA use case for moving coordination out of individual applications and into shared API products.
Learn more