Difference between Background DRb and AJAX

Backgroundrb will release the thread, while a normal AJAX request where you wait for a response will block one of your server connections. This will be the best way to go btw, as your subsequent AJAX calls will only take a few fractions of a second to query the Backgroundrb process, then release the thread for other users.

To illustrate: suppose you’re running a mongrel cluster of 5 mongrels and you have 5 people making such a long running task at the same time, all mongrels will be in use and no one will be able to connect to your site anymore if you use a normal AJAX request which waits for a server response.

Best regards

Peter De Berdt