Fork a process and send data to it inside Rails

Posted by taro on Stack Overflow See other posts from Stack Overflow or by taro
Published on 2010-03-30T20:30:06Z Indexed on 2010/03/30 20:33 UTC
Read the original article Hit count: 165

Filed under:
|
|

I'm making a Rails application. In the one action I need to spawn a long running process. This is not a problem. I can fork new process using spawn gem or some other. But some time after process has been spawned, user must be able to pass additional data to that process.

Sure, I can fork process which will listen a UNIX socket, store socket address in the HTTP session and communicate with that process using drb protocol when user will require to pass new data to process. But I think it is not best solution and it will be a problem to deploy an application to the hosting.

What is the easy way to do that?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails