in reply to To fork() or not to fork()

I don’t see a need for fork in this case, as those three things are not quite related. It is just fine to run them separately.

You didn’t ask, but for your first process, the one to gather changes to database, you can simply use database trigger.

Replies are listed 'Best First'.
Re: Re: To fork() or not to fork()
by asiufy (Monk) on Nov 05, 2003 at 18:30 UTC
    pg: thanks for your input. I'm using the database as a queueing mechanism, since my application receives input from many different systems, and I just have thin front-ends grab this input and put an entry in the database. That was the solution I found, lacking a proper queueing system (like MQ).

    Your suggestion just made me realise I could have the front-ends send UDP signals over to my Perl process, and that will in turn fetch the entries from the database (but only once the UDP signals arrive, not every xx secs as I do now). Unfortunately the front-ends are mostly written in C, and I'm not the one keeping that code ... Anyway, excellent suggestion (++)!

    I'm using MySQL, btw. I don't think there's anything like Oracle's database trigger in it...