background

Xxl-job, Azkaban, ElasticJob, etc. This paper collates and verifies the results of xxL-job subtasks.

Each of the three task scheduling frameworks has its own advantages. The most outstanding one is Azkaban’s flexible task scheduling capability. Xxl-job only supports simple one-way chain tasks, while ElasticJob does not support sub-tasks and can only be implemented through task listeners.

Task dependency of xxL-job

A subtask is configured for task 7. After the current task is executed, the subtask will be executed.After the execution of the respective task actuators is completed, task 2 is triggered again:

Rely on multiple subtasks

Add two tasks dependent on 2 and 4 to task 7 above, and the characteristics of each task are as follows:

  • Parent task 7, broadcast task
  • Subtask 2, single task, executed first only
  • Subtask 4, broadcast task

Then the scheduling of subtasks is performed according to the scheduling policy of subtasks:Task 2 is executed once and is triggered twice by fragment task 7. Task 4 is broadcast execution, sharded task 7 triggers a broadcast behavior on both schedulers respectively, that is, the final execution of 4 times.

Compared to Azkaban

Xxl-job: broadcast fragments. Sub-tasks are supported, but pre-tasks are not supported. Simple single link task support. For example, A->B->C-> D.

Azkaban: No sharding support, rich task orchestration capabilities.Azkaban does this by simply.jobConfiguration allows you to write a rich chain of tasks, which is pretty powerful.

The revelation of

Xxl-job is simple and supports subtasks. However, when configuring subtasks, you need to consider service scenarios, such as whether the task is fragmented. If the task is fragmented, it may be scheduled for multiple times and the execution times are exponentially increased.

Azkaban’s ability to orchestrate tasks through Job descriptions is really powerful.

If you want a simple task scheduling framework that supports rich task scheduling, you probably won’t find it. It’s also impossible to integrate XXL-Job with Azkaban, because Azkaban’s core function is DAG.