node.js / ruby integration with beanstalkd -


this related another question specific payment processing, , example use case, considering trying integrate node.js , ruby on same server using beanstalkd. basically, want use node.js main web server, when need payment processing, i'd use robust , stable ruby.

i considering trying use beanstalkd way have node.js queue payment processing jobs ruby perform in background. documentation beanstalkd little slim, i'm having trouble figuring out if approach, or how go it. can tell though, should straightforward start beanstalkd process , have node.js connect send jobs, , have ruby script can perform jobs , send results.

beanstalk appropriate task. make sure use binlog option make jobs persistent between beanstalkd restarts.

your node.js processes use tube (called, 'payments') , put jobs it, appropriate priority.

your ruby script can watch payments tube , process jobs.

make sure give jobs adequate ttl - want ensure payment processing has time complete before beanstalk assumes job has failed , re-queues it.

just curious - how provide feedback customer payment has succeeded? perhaps ruby script update record in database?


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -