liveBook · Manning

Synchronous call

As explained in Build High Value Software Systems

Processing in which an operation waits for current work to complete before proceeding or returning.

A synchronous call makes the caller wait for the current operation to finish before continuing. In a chain of services, each step waits for the previous one, so total latency accumulates across the chain and a slow dependency delays everything downstream. section 11.3

Use the need for a result now—not a blanket preference for one communication style—to decide what stays synchronous:

  • Keep dependent steps synchronous when a later step needs the earlier result, or when services must agree on state before committing. section 11.5.1
  • Consider asynchronous processing when the user only needs acknowledgment, or when a slow external service need not delay the response. section 11.3 section 11.5.1

Checkout latency

A checkout request passes through six services in sequence. Its 1,050 ms total includes 65 ms of processing; an external payment API accounts for 800 ms of waiting. The user need not necessarily wait for payment processing before receiving confirmation. section 11.3

Figure 11.3 Synchronous chain, total latency is the sum of all steps.

See how latency accumulates when every step in a synchronous chain must finish before the next begins. section 11.3

How Build High Value Software Systems covers it

How deep it goes
Explains sequential waiting, accumulated latency, and design tradeoffs without detailing call implementation.
Examples
Uses a six-service checkout chain, including database contention and a slow external payment API.
What you can do after
Diagnose latency by tracing sequential service calls and identify steps that may not need to block the response.
How it connects
Connects synchronous calls with microservices, asynchronous processing, queues, backpressure, and push and pull architectures.

Also explained in

Compare how 12 books explain synchronous call →

Related concepts

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