How reliable is DRb?

929 views Asked by At

Are there any issues to consider when using DRb for implementing an in-memory message queue and for synchronizing actions between processes? I heard that it could be unreliable, but haven't found anything on the web that confirms this assertion.

In case it's relevant, these would be processes running with a rails app environment that will update models in the database.

2

There are 2 answers

0
BJ Clark On BEST ANSWER

DRb is pretty established and widely used. I don't know of anything that would make it unreliable, but I don't use it as a message queue

I'd say you'll have more luck using a message queue as a message queue, instead of rolling your own using DRb. There's a bunch of solutions depending on your needs, memcacheq is pretty easy to interact with, and is in-memory, and is pretty solid.

0
Phrogz On

I personally use DRb running in two separate processes on my web server one to perform minutes-long calculations, allowing the website to poll and check in on the progress, another as a shared captcha server with its own DB connection for various applications on my server. In neither case have I ever had the DRb server fail (except where it was a programming mistake on my part).

Even when the DRb server does fail, you can restart it and the still-running client will reconnect cleanly the next time it needs to communicate.