Skip to content

Commit 515b701

Browse files
authored
[rust/scheduler] Distributed Scheduler (#2104)
This PR introduces a new module called "scheduler." This module is responsible for the booking aspect of Cuebot and is designed to offload this feature from the central module. Rationale: Cuebot's booking logic depends on responding to each HostReport with a new task that searches for layers to dispatch to the reporting host. Consequently, each request generates a [BookingQuery](https://github.com/AcademySoftwareFoundation/OpenCue/blob/master/cuebot/src/main/java/com/imageworks/spcue/dao/postgres/DispatchQuery.java), which significantly impacts the database. As a result, scaling Cuebot is limited by the need to optimize database capacity to handle complex queries. This new module alleviates the booking workload from Cuebot. Booking on the Scheduler is not triggered by host reports; instead, it operates through an internal loop that searches for pending jobs and seeks suitable matches from a cached view of the hosts in the database. The scheduler organizes layers and hosts into clusters, with each cluster representing a group of show and allocation combinations. This structure allows multiple instances of the scheduler to share the load without competing for work, which is a significant issue in Cuebot. To enable Cuebot and the Scheduler to run concurrently without competing for work, a new feature was added to Cuebot, as detailed in #2087. This feature allows for the addition of an exclusion list containing show and allocations that should not be booked, or it can halt booking for all shows altogether. --------- Signed-off-by: Diego Tavares <dtavares@imageworks.com>
1 parent 5b8b02d commit 515b701

58 files changed

Lines changed: 17457 additions & 33 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ cuebot/.project
2727
/pycue/opencue/compiled_proto/
2828
/rqd/rqd/compiled_proto/
2929
docker-compose-local.yml
30+
/sandbox/kafka*
31+
/sandbox/zookeeper*
3032
docs/_site/
3133
docs/bin/
3234
sandbox/kafka-data
3335
sandbox/zookeeper-data
3436
sandbox/zookeeper-logs
3537
sandbox/rqd/shots/
3638
docs/_data/version.yml
39+
target/*
40+
41+
# Agent files
42+
AGENTS.md
43+
CLAUDE.md

rust/.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33
# TODO: Remove once these crates are stable and ready for public use
44
/crates/cuebot-config
55
/crates/dist-lock
6-
/crates/scheduler
76

87
.DS_Store
98
config/rqd.local_docker.yaml
9+
/sandbox/kafka*
10+
/reference
11+
Cargo.lock
12+
13+
# Localized files only meant for building docker images locally
14+
proto
15+
16+
# Agent files
17+
AGENTS.md
18+
CLAUDE.md

0 commit comments

Comments
 (0)