Build Durable Workflows
in Ruby
Ductwork is a modern workflow orchestration framework that makes complex job pipelines maintainable, durable, and recoverable.
app/pipelines/enrich_all_users_data_pipeline.rb
# Define your pipeline with the DSL
class EnrichAllUsersDataPipeline < Ductwork::Pipeline
define do |pipeline|
pipeline.start(QueryUsersRequiringEnrichment)
.expand(to: LoadUserData)
.divide(to: [FetchDataFromSourceA, FetchDataFromSourceB])
.combine(into: CollateUserData)
.chain(to: UpdateUserData)
.divert(to: { success: NotifyUser, otherwise: FlagForReview })
.converge(into: FinalizeUserRecord)
.collapse(into: ReportUserEnrichmentSuccess)
end
end
# Run your pipeline!
EnrichAllUsersDataPipeline.trigger(days_since_last_enrichment: 7)
Why Choose Ductwork?
Everything you need to build reliable, scalable job pipelines in Ruby
Workflow Orchestration
Define and run complex workflows with branching, parallel execution, and branch merge methods.
Durable Execution
Automatically resume interrupted or orphaned pipelines after a worker crashes, with no manual intervention.
Error Resilience
Automatic retries, graceful failure handling, and detailed error reporting ensure reliability.
Recovery Mechanisms
Parent reaper processes monitor resources and release stale claims so no workflow is ever stuck.
State Persistence
Durable state management lets you deploy without the fear of interrupting pipeline execution.
Rails Integration
First-class Rails support with generators, configurations, and ActiveRecord integration out of the box.
Designed For
Ductwork shines in scenarios where building traditional job queues fall short
Document Processing
Multi-step document transformation with validation, OCR, and storage
Order Fulfillment
Complex order workflows with inventory checks, payment processing, and notifications
Data Migrations
Large-scale data transformations with checkpoints and rollback capabilities
ETL Pipelines
Extract, transform, and load data with parallel processing and error recovery
Email Campaigns
Multi-stage email workflows with personalization, scheduling, and tracking
Onboarding Pipelines
User onboarding processes with sending welcome emails and reminders
From an Early Adopter
“
Sometimes the problems that we as programmers need to solve are simple. Sometimes, though, they’re thorny, with complex edge cases and are fraught with a litany of unpredictable failure scenarios. Ductwork provides a framework with an elegant approach to the latter — speaking from personal experience using Ductwork, it’s saved me tens of hours developing, refining, and making something DIY production-ready. If you like software that does its job and does it incredibly well then I highly recommend kicking the tires.
Rob Sterner
Principal Engineer @ Nift
Simple, Transparent Pricing
Start free and scale as you grow. Both plans include core workflow features.
Open Source
Perfect for proof-of-concepts, getting started, and small-scale deployments
- Core workflow DSL and transitions
- Durable state management
- Scalable threaded job worker pool
- Scalable threaded pipeline advancer pool
- Automatically restart stuck threads
- Rails engine-mountable web dashboard
- Reaper process recovers stale resources
- Forking and threaded concurrency modes
- Community Support
Pro Tier
Built for production workloads, large-scale pipelines, and teams that need more control
- Everything in Open Source
- Millions-wide fan-out/fan-in
- Large, lazy payload support
- Human-in-the-loop functionality
- Configurable step timeout
- Configurable step delay
- Interruptible pipeline advancement
- StatsD metrics reporting
- Direct, multi-channel, priority Support
or $2,000/year billed annually (2 months free)