I'm thinking of using fork() for long running calculations in some
code of mine, that's run via the Apache fcgid module. It's some heavy
calculation/db work that, however, doesn't need to send anything back
to the user. Are there any problems with this approach?
I'm thinking of using fork() for long running calculations in some
code of mine, that's run via the Apache fcgid module. It's some heavy
calculation/db work that, however, doesn't need to send anything back
to the user. Are there any problems with this approach?
Look into backgroundrb first... might work better for you...
fork() is a lot simpler. The only issue was if your process failed-
you end up with zombie processes that dont get cleaned up until
reboot. I use it though - make sure you exit gracefully.
though late to the thread, I would recommend activemessaging - just send a message to a queue, and it can be picked up and processed by another process (remote or local). Nice thing is you fire and forget - you don’t have to worry about who processes the message or where it gets processed.