liveBook · Manning

Structured concurrency

As explained in Microservices Patterns, Second Edition

Structured concurrency is a concurrency model that scopes concurrent tasks within a well-defined lifetime and hierarchy.

Structured concurrency manages concurrent tasks within a well-defined scope. In API composition, it is an option for coordinating provider calls while keeping the composer maintainable, performant, and scalable. section 12.3.3

Provider calls in an API composer

A findOrder query can call independent providers in parallel, with latency determined by the slowest provider. Queries with dependencies may mix sequential and parallel calls. section 12.3.3

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines scoped task management but does not detail its implementation.
Examples
Uses findOrder to illustrate parallel calls to independent providers and sequential calls when results depend on one another.
What you can do after
Evaluate structured concurrency as an option for managing parallel and sequential provider calls in an API composer.
How it connects
Connects API composition with reactive designs using CompletableFuture, Reactor Mono, or Flux.

Also explained in

Compare how 2 books explain structured 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.