Recap
In the previous article on Atomic Transactions , we looked at how transactions can guarantee state consistency.
In this article, we will go one level deeper into the design of the Scheduler . We will discuss the trade-offs behind different scheduling strategies, and map our implementation back to the corresponding paths in the scheduling flowchart.
The Core Concept of a Scheduler
A Scheduler is the “invisible commander” inside a reactivity system.
It decides when update tasks should run .
It directly affects both performance and the developer mental model .
Simply put, the Scheduler is not about whether something should be computed .
It is about when it should be computed .
Categories of Scheduling Strategies
Scheduling strategies can roughly be divided into the following categories.
Synchronous Scheduling
Characteristic: After data is updated, the corresponding side effects run immediately.
Pros: The logic is straightforward.…