giovaniguizzo
Joined 1 year ago
Joined 1 year ago
You can probably deploy Sidequest a job processor for all your 20+ services. Each service can enqueue the jobs and you can run as many machines as you want with Sidequest just to run the jobs. You maintain the 12-factor principle - your services remain stateless and delegate scheduled work to Sidequest.
The only requirement here is that the scripts to be executed must be in the same path in all machines. As long as you follow that, you can deploy it and run your jobs :)
Great question!
Sidequest uses transaction-level row locks (`SELECT ... FOR UPDATE SKIP LOCKED`) when fetching jobs. This means each worker thread only locks the specific job rows it’s about to process, minimizing lock contention and avoiding blocking other queries. This pattern is inspired by Oban’s advisory-lock approach, but instead of using explicit advisory locks, Sidequest relies on the database’s built-in row locking mechanism.
The only drawback is that Sidequest will require one or two connections to your DB. If you enqueue jobs from within other jobs, then each job that requests an enqueue will also connect to your DB (lazily connected upon request - if your job does not enqueue, no connection is created). However, you can configure the number of concurrent workers per queue and globally, so you control how much load Sidequest puts on your database.
I hope that answers your question :)
Graphile Worker: PostgreSQL only
Sidequest: Multiple backends (PostgreSQL, MySQL, SQLite, MongoDB)
Graphile Worker: No built-in dashboard - you need external monitoring
Sidequest: Comprehensive built-in web dashboard for job monitoring
Graphile Worker: Single queue with job prioritization
Sidequest: Multiple queues with individual: i) Concurrency limits; ii) Priority levels; iii) State management (active/paused); iv) Isolated workloads.
Graphile Worker: Direct PostgreSQL integration, very lightweight
Sidequest: Worker threads for non-blocking processing, more comprehensive job lifecycle management
Graphile Worker: Optimized for PostgreSQL performance (3ms latency)
Sidequest: Balanced performance with rich feature set
I hope that helps answering your question.