Mark Thomas wrote:
...
> 2. A message queue (e.g. ActiveMQ + Stomp), where worker threads run
> as separate processes, thus using all cores.
...
> I would like to see if anyone has gone down this road and can weigh in
> on these options.

I have gone down option 2, it works well.

Depending on your application, you may not need the sophistication of a 
"real" queue manager. You could just create a Queue object (from 
thread.rb), running in its own process, and share it using DRb. Multiple 
reader processes can pop messages from the queue, and will block until a 
message is available. Writers can push messages into the queue as 
required. There is also SizedQueue which will block the writers if the 
queue gets too full.

A "real" queue manager like RabbitMQ may make sense if you need your 
subtasks to persist in the queue in the event of a system crash. But for 
a simple worker-farm type of application, this usually isn't necessary.

Regards,

Brian.
-- 
Posted via http://www.ruby-forum.com/.