Join GitHub today
MVP new Actor Framework & Scheduler #635
Zeebe has a diverse work load including
Also, it needs to participate in network protocols such as Gossip and Raft which formulate requirements like sending pings and heartbeats at regular intervals or responding to such requests within a particular time frame.
This results in conflicting requirements as to how to process this workload
Actors and Green Threads
Currently Zeebe uses an actor model based on green threads. The system is implemented as number number of cooperating, non-blocking actors which are scheduled to a small number of threads. To not oversubscribe the CPUs (utilize past saturation point), the number of threads needs to be smaller or equal to the number of cores the system has. This is highly efficient since the actors are non-blocking: when a actor cannot make progress because it is waiting on data to become available or other conditions, it released the thread which can now progress to do work inside another actor.
While this model is generally very well suited for implementing a high-throughput system like Zeebe, the current implementation has many problems.
Problems with the current Implementation
The current implementation has the following problems
The proposed implementation is comprised of two parts:
In more detail, this means
We can never have everyting at the same time. The following tradeoffs are made in the implementation
TODOS for MVP
TODOs for full version
@menski, I think it makes sense to merge scheduler mvp to master, it is not used yet and it does not change anything else, hence it should not cause any problems.
In order to do that, we need to update agrona to 0.9.12. The reason is that we are using DeadlineTimerWheel which has been added in that version.