Skip to main content

February 7th, 2026

Architectural Deep Dive: Scheduling Strategy Today we made a definitive architectural decision regarding how the verification and recurrence loop should be structured. The choice was between a “Per-Task Chain” (many independent loops) and a “Per-User Chain” (one master loop per user).

🏗️ The Decision: Stick with Per-Task Architecture

We strongly reaffirmed the current Per-Task Chain architecture. While a Per-User master chain might look cleaner in the dashboard, it introduces significant complexity and performance penalties.

Why Per-Task is Superior?


🔍 Detailed Analysis

1. Database Load

With a Per-User chain, every verification event would require querying all of a user’s pending task instances to find the “next” one.
  • Per-Task: 1 read per verification.
  • Per-User: N reads per verification (where N = total tasks).

2. Timing & Precision

The sequential nature of a Per-User chain means overhead accumulates. If a user has 50 tasks, the 50th task’s execution time would be delayed by the cumulative query time of the previous 49. Per-Task chains fire exactly when scheduled.

3. Code Complexity

The Per-Task recursion is elegant and simple:
A Per-User master chain requires handling array reducing, filtering, cancellation of existing jobs, and complex race condition management during updates.

🚀 Recommendation

We are keeping the current architecture. The benefits of independence, performance, and simplicity far outweigh the cosmetic benefit of having fewer rows in the scheduler dashboard.
Next Actions: Stop questioning the architecture. It is correct. Focus on building user-facing features:
  1. GPS Verification
  2. Photo Verification
  3. Partner Verification
  4. Video Verification

📝 Reference

This decision prevents us from falling into the trap of “over-engineering” a centralized scheduler that Convex doesn’t need. Convex’s scheduler is built to handle thousands of independent jobs efficiently—we should leverage that.