1

I have an issue attemping to do DRb.start_service from 3 separate forked processes, is DRb.start_service thread/process-safe?

Out of the 3 processes, 2 start DRb servers fine, the 3rd hangs forever at the DRb.start_service line, I would like to know if this is a limitation of DRb, or a problem elsewhere in the code.

thnetos
  • 1,316
  • 10
  • 9
  • start_service itself should be safe, but it may depend on your ruby implementation... I know JRuby has gotten better at this, not sure about MRI. Try using ruby-debug or something similar on that 3rd process to see where in the DRb code it might be blocking. It could be in the DRb::DRbServer.new constructor somewhere; more likely, it's in your code. If you run through the debugger and it gets past the constructor, then you know it's a problem in your code [probably]... – Dan Fitch Jul 21 '09 at 14:47
  • My personal view is that DRb is a mistake. Virtually everything you'd use DRb for is better dealt with by a message queue, in particular, something AMQP-based. I wish there was AMQPlite or something though, because sometimes it can be a little on the heavy side. My personal preference is celldee's Bunny + RabbitMQ. – Bob Aman Sep 27 '09 at 01:32

0 Answers0