Card 08/ 09
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.
- A public API for partners to create shipments, used by companies in many languages.
- A mobile app with forty screens, each showing a different slice of orders, products and customers, built by one team.
- A pricing service called 5,000 times a second by an order service, both written by the same company in Go and Java.
- An internal dashboard in the browser that shows a few reports, each loaded from a fixed list.
Show the answers
| Integration | Style | Why |
|---|---|---|
| Partner shipments API | REST | Unknown clients in any language, curl to try it, HTTP caching, and an OpenAPI contract |
| Mobile app, forty screens | GraphQL | Varied screens over the same data; one request each, only the fields shown |
| Pricing service | gRPC | Both ends owned, high volume, small binary messages and generated typed clients |
| Browser dashboard | REST | Fixed reports, a browser client and cacheable GET responses; GraphQL would add little |
← → move through sections and cards