1 pointby dr_kvet6 hours ago1 comment
  • dr_kvet6 hours ago
    I built a TypeScript job queue where jobs are stored in your existing database (Postgres, SQLite, MongoDB) rather than Redis.

    The main idea: start jobs inside your database transaction. If the transaction rolls back, the job never exists. No dual-write consistency problems, no transactional outbox pattern needed. Job chains work like Promise chains — continueWith instead of .then(). Jobs can branch, loop, or wait for other jobs to complete (like Promise.all).

    Redis/NATS can optionally be added for faster notifications, but no job state lives there — just an optimization.

    Looking for feedback on the API design.