What is the implementation of timer in Camunda Platform 8

I struggled reading zeebe source code to understand zeebe timer (such as job timeout or timer event), bug found that there is a wheelTimer in memory (ScheduleSerivce) and a DB timer(DbTimerInstanceState). So what is the implementation of timer?Firstly acquire jobs from Db and then process them with wheelTimer?

Hi @Ge-Zhicheng,

As a high-level overview of the job activation process:

Job activation is done by a worker polling for available work with the ActivateJobs API call.

When this API is called over gRPC, the gateway reaches out to the cluster nodes with the call, and they activate jobs and pass them to the gateway.

When the job is activated on the broker, the timer is started, and the duration of the timer is set to the timeout specified in the ActivateJobs API call parameters.

As for the implementation of the job activation timer in Zeebe, or timer events (such as an intermediate timer) and where to find those in the source code, someone else will have to speak to that.

Josh

Thanks for the prompt reply. I understand the usage of job activation and the behavior of job timer. I just wonder whether it is a huge pressure for zeebe when there are many jobs waiting for completition or failure. In other words, what is the cost of unexpired timers in zeebe?

Zhicheng