"When Stateless APIs Are Not Enough: Deep Dive Into A Reactive Backend Design" by Matthieu Baechler and Luc Duzan at Functional Scala 2022.
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.
In this presentation, Matthieu and Luc 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.
Contents in the video:
01:07: We Are Conduktor
02:10 Speaking About Kafka
03:00 Conduktor Console
04:20 Exploring Solutions - Solution 1: Single Request
05:18 Solution 2: Query In Two Steps
06:08 Solution 3: Restful
07:45 Solution 4: Streaming Design
10:53 Key Takeaways
11:59 Loading Next Page
16:22 Step By Step Execution
20:37 Key Takeaways
21:29 When Not To Use That
Grab Your Early Bird Tickets for the Functional Scala 2023! ➡️ www.eventbrite.com/e/function...
#FunScala2022 #scala #zio #functionalprogramming #functionalscala #scalaconference #scaladeveloper
Негізгі бет Ғылым және технология When Stateless APIs Are Not Enough: Deep Dive Into A Reactive Backend Design
Пікірлер: 2