Beyond REST API’s – An overview about modern API technologies
summary
Overview of GraphQL gRPC and RSocket with concrete Spring tooling and a working demo of a task management app plus a project chat. GraphQL uses a single endpoint and a schema (uses the Spring GraphQL library) to let clients fetch exactly requested fields and subscribe over websockets, reducing round trips but requiring pagination and custom error handling. gRPC runs on HTTP/2 with a Netty server and protobuf for smaller payloads, good for backend-to-backend streaming and integrates with Spring Cloud Gateway. RSocket uses TCP or websocket, offers backpressure and bidirectional streams via RSocket requester/responder and works in browsers for live updates. Links and code live in the YATT GitHub repo.
AI-written summary · about
chapters (13)
- 0:00Intro
- 4:29The REST API endpoints for the task resource might look like this
- 10:38making the server an executor of an arbitrary number of different queries ...
- 13:27Subscriptions allow to constantly send updates to a client based on their query...
- 15:43There are many scenarios conceivable to add a GraphQL API to your existing application ...
- 18:33JSON payloads are not the most efficient way to package the stuff for transportation ...
- 19:27Consuming a REST API requires either some manual work or a set of tools to get going ...
- 22:37The server implementation inherits from the generated services base class...
- 23:52or an asynchronous one, which is useful for unbound server-streaming, for example.
- 27:52Summary / Takeaways GRPC
- 31:16Once a connection is established, both ends can become requester and responder
- 34:27Spring supports annotated handlers to implement responders (Spring Messaging)
- 40:31A few guiding questions that could make you think about any of the presented alternatives
related talks
55mBuild APIS with SpringBoot - REST, GRPC, GRAPHQL which one should you pick? Cedrick Lunven
50mSpring Time: From REST to GraphQL
43mTUTORIAL: We've "REST"ed long enough -- let's have an API adventure!
51mGraphQL, gRPC or REST? Resolving the API Developer's Dilemma
01h 15mREST, GraphQL, and gRPC: A Comparison
59mGraphQL, gRPC or REST? Resolving the API Developer's Dilemma
17mBoost API Performance: gRPC vs REST vs Async
36mDesigning API: REST, gRPC or GraphQL?
