Card 08/ 09

ExerciseDifficulty: Advanced1 min

Practice: A Style for Four Integrations

A public partner API, a mobile app with many screens, two internal services and a browser dashboard.

Choosing a style means starting from the clients. Choose REST, GraphQL or gRPC for each of these four integrations, and give the reason.

  1. A public API for partners to create shipments, used by companies in many languages.
  2. A mobile app with forty screens, each showing a different slice of orders, products and customers, built by one team.
  3. A pricing service called 5,000 times a second by an order service, both written by the same company in Go and Java.
  4. An internal dashboard in the browser that shows a few reports, each loaded from a fixed list.
Show the answers
Each integration, the style that fits, and why
IntegrationStyleWhy
Partner shipments API RESTUnknown clients in any language, curl to try it, HTTP caching, and an OpenAPI contract
Mobile app, forty screens GraphQLVaried screens over the same data; one request each, only the fields shown
Pricing service gRPCBoth ends owned, high volume, small binary messages and generated typed clients
Browser dashboard RESTFixed reports, a browser client and cacheable GET responses; GraphQL would add little