BLUEPRINT · The Solution Architect's Codex
Ch 08 · Integration & API Architecture
Chapter 08 · How systems actually talk

Integration & APIs — from spaghetti to service mesh

No system lives alone. Integration is the substrate of every enterprise: how requests flow, how events propagate, how partners exchange documents, how data crosses trust boundaries. The history of enterprise IT can almost be told as the history of its integration patterns — from point-to-point to ESB to API gateways to service meshes to event meshes and data meshes.

8.1 · The integration spectrum

Every integration architecture sits somewhere on a continuum from "everyone calls everyone directly" to "everything flows through shared infrastructure." Each step trades autonomy for governance and vice-versa.

point-to-point
→
hub-and-spoke
→
ESB
→
API gateway
→
service mesh
→
event bus
→
data mesh

Few enterprises are at one point on this line — most are at several at once, deliberately. The architect's job is to know which substrate is right for which integration: gateways at the north–south edge, mesh for east–west, event bus for asynchronous fan-out, data mesh for analytical sharing.

8.2 · Enterprise Integration Patterns (Hohpe & Woolf, 2003)

The canonical reference. 65 patterns, divided into Channels, Endpoints, Messages, Routing, Transformation, Management. Twenty-plus years later the icons are the lingua franca of integration; modern tools (Apache Camel, Mule, Spring Integration, NServiceBus) implement them by name.

PatternJob
Message ChannelThe pipe between sender and receiver
MessageThe atomic unit on the channel (header + payload)
Pipes & FiltersChain stateless processors on a channel
Message RouterDirect a message to one of several outputs based on rules
Content-Based RouterRoute by inspecting the payload
Message TranslatorReshape between schemas
SplitterBreak a composite message into smaller ones
AggregatorCombine related messages into one
Recipient ListSend the same message to a dynamic list of recipients
Process ManagerStateful orchestrator across multiple messages
Message EndpointApplication-side adapter to the channel
Dead Letter ChannelWhere un-deliverable messages go for inspection

8.3 · The ESB era — and why it died

The Enterprise Service Bus dominated 2005–2015: TIBCO BusinessWorks, IBM Integration Bus (formerly WebSphere Message Broker), Oracle Service Bus, MuleSoft (original), Software AG webMethods. The promise: one central platform doing routing, transformation, orchestration, and protocol mediation between every application. The reality: the bus became the place where every team's business logic was buried, releases serialised through a single integration team, vendor lock-in deepened, and the bus itself became the largest single point of failure in the enterprise. The microservices movement (≈2014) and the API-gateway pattern displaced the ESB by pushing logic back into services and reserving the middle for stateless concerns.

Lesson
Centralising business logic in shared middleware is an organisational decision masquerading as a technical one. It scales as well as the team that owns it.

8.4 · The API gateway era

An API gateway is a stateless reverse proxy in front of backend services. It owns concerns that don't belong in the service: authentication and token exchange, rate limiting and quotas, routing and versioning, request/response transformation, caching, observability, monetisation. Examples: Kong, Apigee (Google), AWS API Gateway, Azure API Management, Tyk, Gravitee, Solo Gloo, WSO2.

ResponsibilityBelongs at gateway?
OAuth / OIDC token validationYes — uniform, audited
Rate limit per consumerYes — fairness, abuse prevention
Schema transformation between major versionsYes — short term, plan to retire
Business rule "if customer is gold, route to premium queue"No — that's domain logic, belongs in the service
Service-to-service mTLS & retryNo — that's east–west, belongs in mesh

8.5 · API-led connectivity (MuleSoft)

MuleSoft popularised a three-layer API taxonomy that has become widely cited regardless of vendor:

  • System APIs — wrap each system of record (SAP, Salesforce, mainframe) with a stable, canonical interface. Built once.
  • Process APIs — combine and orchestrate system APIs to implement business processes (e.g. OrderToCash). Reusable across channels.
  • Experience APIs — channel-specific shaping (mobile, web, partner portal). Cheap to spin up and retire.

The discipline pushes domain logic toward the centre and lets the experience layer stay disposable. It complements DDD (Ch 07) and is well-served by GraphQL or BFF (Backend-for-Frontend) at the experience layer.

8.6 · Service mesh — east–west infrastructure

A service mesh handles service-to-service traffic inside a cluster: mTLS, mutual identity (SPIFFE/SPIRE), retries with budgets, circuit breaking, traffic shifting (canary, blue-green, weighted), telemetry. Implementations: Istio (Envoy data plane, control plane in Go), Linkerd (Rust-based, lightweight), Consul Connect (HashiCorp), Cilium (eBPF-based, no sidecar required). Service-mesh-vs-API-gateway is not either/or — most production architectures use both: gateway at the edge for north–south, mesh inside for east–west.

8.7 · Orchestration vs Choreography

AspectOrchestrationChoreography
Control flowCentral conductor (Temporal, Camunda 8, Step Functions, Conductor)Each service reacts to events
VisibilityEasy — the orchestrator is the traceHard — needs distributed tracing
CouplingServices coupled to orchestratorServices coupled to event schemas
Best forLong-running, transactional, compensating workflowsFan-out, decoupled domain reactions

8.8 · B2B integration

The world outside the cloud-native bubble still runs on standards that predate the web. Solution architects in retail, logistics, healthcare, automotive, and government must speak this language fluently.

StandardWhat it is
EDI X12 (ANSI)North-American electronic document standard — 850 PO, 810 Invoice, 856 ASN, etc.
EDIFACT (UN/CEFACT)International equivalent — ORDERS, INVOIC, DESADV
AS2 (RFC 4130)Secure HTTP-based transport for EDI; signed, encrypted, MDN-acknowledged
AS4SOAP/ebMS-based successor; mandated by PEPPOL, European e-Invoicing
SFTPStill the most-used transport for partner file drops
PEPPOLEU public-procurement document exchange network; access points + SMP/SML
HL7 v2 / FHIRHealthcare data exchange (v2 = pipe-delimited legacy; FHIR = REST + JSON modern)
SWIFT MT / ISO 20022Inter-bank financial messaging; ISO 20022 is the modern XML/JSON standard

8.9 · iPaaS — Integration Platform as a Service

Cloud-hosted integration platforms abstract connectors, triggers, and transformations into a low-code surface. They live on a spectrum from enterprise-grade to citizen-developer.

TierExamplesStrengths
Enterprise iPaaSMuleSoft Anypoint, Dell Boomi, SAP Integration Suite, Informatica IICSGovernance, scale, hundreds of connectors, on-prem agents
Mid-market / workflowWorkato, Tray.io, CeligoFaster delivery, decent governance
Citizen / no-codeZapier, Make (Integromat), n8n (open source), PipedreamSpeed, breadth, low barrier; weaker governance

8.10 · Event-driven backbones

ToolModelSweet spot
Apache KafkaDistributed log; consumers track offsetsHigh throughput, replay, event sourcing, streaming
NATS (JetStream)Lightweight pub-sub + log; small footprintEdge / IoT / microservice glue
RabbitMQAMQP broker, queue-centricClassic work queues, RPC over messaging
AWS EventBridgeServerless event bus + rule routingSaaS-event ingestion, AWS-native fan-out
GCP Pub/SubAt-least-once global pub-subGCP-native streaming, analytics ingestion
Azure Event Grid / Hubs / Service BusThree products: reactive events / streaming / enterprise messagingAzure-native, choose by workload
Apache PulsarMulti-tenant log + queue hybrid, segmented storageGeo-replication, multi-tenant SaaS
RedpandaKafka-compatible, C++, no ZooKeeperLow-latency Kafka workloads

Gateway + mesh + event bus working together

API Gateway (north–south: authN, rate-limit, routing) Service mesh (east–west: mTLS, retry, traffic shift) orders-svc billing-svc ship-svc notify-svc Event bus (asynchronous fan-out: Kafka / EventBridge / Pub-Sub)

8.11 · API styles & their fit

StyleTransport / specUse when
REST (Fielding 2000)HTTP + JSON, OpenAPI 3.xResource-centric, public APIs, broad tooling
GraphQL (Facebook 2015)HTTP + schema, single endpointMultiple clients with different field needs; BFF
gRPC (Google 2016)HTTP/2 + ProtobufLow-latency east–west, polyglot internal services
AsyncAPISpec for event-driven APIs (Kafka, AMQP, MQTT)Documenting topics, channels, schemas for async
WebHooksHTTP callback from producer to subscriberSaaS-to-customer eventing without a broker
MCP (Model Context Protocol, 2024)JSON-RPC over stdio / SSE / HTTPTool / context exposure to LLM agents — see AI Codex
Pairing
REST at the edge, gRPC east–west, AsyncAPI for the event bus, GraphQL at experience APIs, MCP for AI-agent surfaces. The choice is not religious — match the style to the consumer and the latency budget.

8.12 · Self-check

Q1 · An API gateway is best suited for…
Service-to-service mTLS inside a cluster
North–south traffic: auth, rate limits, routing, observability
Persistent event storage with replay
Long-running stateful business workflows
Q2 · Which book introduced the canonical 65 Enterprise Integration Patterns?
Patterns of Enterprise Application Architecture — Fowler (2002)
Enterprise Integration Patterns — Hohpe & Woolf (2003)
Building Microservices — Newman (2015)
Designing Data-Intensive Applications — Kleppmann (2017)
Q3 · MuleSoft's API-led connectivity has three layers; which is the bottom?
Experience APIs
Process APIs
System APIs
Partner APIs
Q4 · AS2 (RFC 4130) is most commonly used to transport…
FHIR resources between hospitals
EDI documents (X12 / EDIFACT) between trading partners
Kafka events across regions
SWIFT MT messages between banks