liveBook · Manning

Concurrency

As explained in Microservices Patterns, Second Edition

Concurrency is the condition in which multiple operations or transactions execute during overlapping periods of time.

Concurrency occurs when operations or transactions overlap. When they access the same data, races and lost updates can violate correctness; transaction boundaries define rules for handling conflicts and exposing changes. section 9.1.1

In distributed systems, concurrency also helps reduce query latency:

  • Call independent provider services in parallel: total latency can approach that of the slowest provider instead of the sum of their latencies. section 12.3.3
  • Call dependent providers sequentially when one result is needed to invoke another; combine sequential and parallel calls as the query requires. section 12.3.3

Reactive design and structured concurrency are options for managing concurrent API-composition tasks. Choose parallel calls where dependencies allow them, while preserving the transaction rules needed for correctness. section 12.3.3 section 9.1.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Explains transaction risks and parallel service calls, but does not detail scheduling internals.
Examples
Uses createOrder state changes and findOrder provider calls to illustrate shared-data risks and parallel execution.
What you can do after
Apply concurrency by parallelizing independent provider calls and sequencing dependent calls.
How it connects
Connects concurrency to transactions, race conditions, API Composition, reactive design, and structured concurrency.

Also explained in

Compare how 31 books explain concurrency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.