# Background processes, on a per request basis

**URL:** <https://www.ruby-forum.com/t/background-processes-on-a-per-request-basis/128832>\
**Category:** Rails\
**Created:** [February 12, 2008, 12:36am UTC](https://www.ruby-forum.com/t/background-processes-on-a-per-request-basis/128832 "2008-02-12T00:36:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carpeliam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e19adc/32.png) [@carpeliam](https://www.ruby-forum.com/u/carpeliam)\
**Post date:** [February 12, 2008, 12:36am UTC](https://www.ruby-forum.com/t/background-processes-on-a-per-request-basis/128832/1 "2008-02-12T00:36:53Z")

</div>

Every time a particular model object is created on the server, I want to  
perform an additional operation that’s slightly more expensive, the  
results of which aren’t necessary to show to the user. I was looking at  
things like BackgrounDRb, but I really don’t think I need a continuous  
process running in the background if I’m just going to be running this  
operation on a per request basis. Also, I’m on a shared Dreamhost  
server, so running continuous processes is not always very reliable on  
its own. Is there a way that I can perform this sort of background  
operation without running a continuous process? Thanks much.

---

<div class="post-metadata">

**Author:** ![carpeliam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e19adc/32.png) [@carpeliam](https://www.ruby-forum.com/u/carpeliam)\
**Post date:** [February 12, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/background-processes-on-a-per-request-basis/128832/2 "2008-02-12T14:14:18Z")

</div>

I just wanted to bump this, I haven’t received any responses yet. Would  
it be a good idea to use threads directly here? Any ideas?

Liam M. wrote:

> Every time a particular model object is created on the server, I want to  
> perform an additional operation that’s slightly more expensive, the  
> results of which aren’t necessary to show to the user. I was looking at  
> things like BackgrounDRb, but I really don’t think I need a continuous  
> process running in the background if I’m just going to be running this  
> operation on a per request basis. Also, I’m on a shared Dreamhost  
> server, so running continuous processes is not always very reliable on  
> its own. Is there a way that I can perform this sort of background  
> operation without running a continuous process? Thanks much.

---

<div class="post-metadata">

**Author:** ![carpeliam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e19adc/32.png) [@carpeliam](https://www.ruby-forum.com/u/carpeliam)\
**Post date:** [February 12, 2008, 2:40pm UTC](https://www.ruby-forum.com/t/background-processes-on-a-per-request-basis/128832/3 "2008-02-12T14:40:44Z")

</div>

Liam,

its own. Is there a way that I can perform this sort of background

> operation without running a continuous process? Thanks much.

Look at BBQ  
[http://pastie.textmate.org/private/vxqxcvv40omkrhvnzp6a](http://pastie.textmate.org/private/vxqxcvv40omkrhvnzp6a)

More solutions discussed here :

[http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue](http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue)

Alain R.
