liveBook · Manning

Client

As explained in Microservices Patterns, Second Edition

A service client is a software component that invokes one or more service APIs on behalf of a user interface or application.

A service client can compose a system query by retrieving data from multiple services for a frontend view. This fits a frontend on the same LAN; a client outside the firewall may face a slower network. section 12.3.1

Choose where to place the API composer based on who uses the query and how complex its aggregation is:

  • Use a service client for a frontend operating on the same LAN. section 12.3.1
  • Use an API gateway when the query belongs to the external API; use a Backend-for-Frontend when it should be optimized for a specific frontend. section 12.3.1
  • Use a composition service for queries shared internally by multiple services or for external queries with aggregation too complex for the gateway. section 12.3.1

Order Status view

A web application on the same LAN can retrieve order details through client-side composition. This is probably impractical for an outside client accessing services over a slower network. section 12.3.1

Figure 12.8 Four possible locations for an API Composer: client, API Gateway, Backend-for-frontend, or composition service
AllApiComposerLocations

Compare the four possible locations for an API composer. section 12.3.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Compares four placement options and their applicability, without detailing API composition implementation.
Examples
Uses a web Order Status view on the same LAN and contrasts it with outside-firewall access.
What you can do after
Evaluate composer placement by weighing client network location, query audience, and aggregation complexity.
How it connects
Links client-side composition to API composition, API gateways, Backend-for-Frontend, and system queries.

Also explained in

Compare how 18 books explain client →

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.