liveBook · Manning

Temporal dependency

As explained in Grokking Software Architecture

A dependency in which one software component must be available or synchronized at a particular time for another component to complete an operation.

A temporal dependency, also called temporal coupling, exists when components must be online and responsive at the same time for an operation to succeed. A slow or unavailable component can make the whole synchronous process fail. section 7.1

A chain that falls together

An Order API calls Inventory, Payment, then Shipping. If Shipping is down, the purchase fails—even when inventory is available and payment is valid. It’s like a phone call: both parties have to be there at once. section 7.1

Asynchronous communication breaks the need to act at the same moment: a sender can publish an event while a receiver is unavailable and process it later. The tradeoff is a real gap between an event being sent and processed, so systems must allow for eventual consistency. section 7.9

Figure 7.2 Synchronous coupling requires both parties to be present. Asynchronous decoupling allows the receiver to sleep while the sender keeps working.

Compare synchronous communication, which requires both parties to be present, with asynchronous communication, which lets the receiver process work later. section 7.1

How Grokking Software Architecture covers it

How deep it goes
Defines the dependency, illustrates its failure mode, and contrasts it with asynchronous communication and eventual consistency.
Examples
Illustrates the failure with an Order, Inventory, Payment, and Shipping service chain and compares synchronous calls to phone conversations.
What you can do after
Evaluate whether an operation requires two services to be available simultaneously and understand the eventual-consistency tradeoff of asynchronous communication.
How it connects
Connects temporal coupling to synchronous communication, orchestration, event-driven architecture, and eventual consistency.

Also explained in

Compare how 3 books explain temporal dependency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.