When stateless APIs are not enough: deep dive into a reactive backend design
There are two approaches to Single Page Application design: either build on top of REST resources or embrace backend-for-frontend style (using GraphQL or not).
The former is common, but it may be chatty, and you give a lot of responsibilities to the frontend. The latter solves both of these issues, but you lose the benefit of incremental data loading of data and the latency of a request is now the latency of the slowest piece of data.
The slower the resources you need to work with are, the worse the situation is. Let's say you also want the application to be reactive, displaying data as it becomes available. Adding polling would exacerbate the problem.
As a result, they attempted to engineer a solution for the best of both worlds: short latency, incremental loading, updates without polling, coarse grain resources, and cancellation.
Matthieu will show you how to model your backend with ZStream and mapAccumZIO to implement a finite state machine and deliver these promises while keeping a clean and maintainable codebase.