Cloud Computing Architecture Guide

APIs, Messaging, Events, Streams, and Workflows

What This Chapter Is About

Teach integration as the choice of communication contract, timing, coupling, delivery semantics, coordination, and failure behavior between systems.

Keep one durable idea in view:

An integration architecture is a set of explicit contracts for communication, time, ownership, and failure.

Sections

  1. Integration Starts With Contracts and Coupling

  2. Synchronous APIs and Request-Response Boundaries

  3. Queues, Topics, and Event Routing

  4. Streams, Workflows, Orchestration, and Choreography

  5. Retries, Idempotency, Ordering, Replay, and Failure Handling

  6. Designing an Order-Processing Integration Flow

How the Chapter Develops

The chapter develops in this order:

  1. Define contracts and identify temporal, deployment, and ownership coupling.

  2. Use synchronous request-response only where an immediate answer is part of the contract.

  3. Introduce queues, topics, and routed events for asynchronous work and fan-out.

  4. Separate streams from events and orchestration from choreography.

  5. Make delivery and failure behavior explicit through idempotency, retries, ordering, replay, and dead-letter handling.

  6. Apply all choices to an end-to-end order flow.

Together, these sections show that this capability is an architecture responsibility and decision space, not a catalog of provider features.

What You Will Be Able to Do

By the end of this chapter, the reader should be able to:

  • Choose between APIs, queues, topics, events, streams, and workflows based on the interaction contract.

  • Explain the coupling and failure consequences of synchronous and asynchronous communication.

  • Distinguish orchestration from choreography and events from streams.

  • Design retry, idempotency, ordering, replay, and dead-letter behavior deliberately.

  • Narrate an order-processing integration design from business event to operational recovery.

Key Ideas

  • The communication contract should be chosen before the provider service.

  • Asynchronous communication moves failure and consistency concerns; it does not remove them.

  • Events state what happened; commands request work; streams retain ordered records for ongoing processing.

  • Orchestration centralizes process visibility, while choreography distributes coordination.

  • Reliable integration depends on explicit duplicate, delay, ordering, replay, and poison-message behavior.