API Styles
За пределами базового REST: gRPC для быстрых внутренних вызовов, GraphQL для гибких срезов данных, HATEOAS как зрелость REST — когда что и какой ценой.
Why this matters for a backend engineer. REST with JSON is the workhorse, but not the only option. When services call each other constantly, when a client needs different slices of data, when a strictly typed contract matters — REST starts to get in the way. This section is about what lies beyond it and when it's justified. The REST basics are in the REST and contracts section. Part of the study program.
REST by default is the right choice for most tasks. The other styles are taken not "instead of" but for a specific pain point. Below are the three that come up most often, with an honest look at when each fits.
Articles in this section
- gRPC: fast calls between services — a binary protocol, protobuf contracts, streaming: when it beats REST and at what cost.
- GraphQL: the client asks for exactly what it needs — one request instead of five, schema and resolvers, and why the flexibility is paid for in caching and load.
- HATEOAS: REST maturity and hyperlinks — the top level of the Richardson model: responses that tell you what to do next — and why it's rarely needed.
Related
- REST and contracts — the base everything else sits on top of.
- Networking for backend engineers — HTTP/2, which gRPC runs on, is covered there.
- System design — choosing an integration style as part of design.