Nup. My clarification is that you should drop the 'permanent connection' approach and go with a transaction approach.
You are taking the wrong approach in recursing through a database to find changes. Either the database or the program which inserts the changes has to be responsible for alerting other programs to the changes.
When your database grows large (if it grows large) you will be putting a heavy load on the database server.
Don't use threads, use forks in perl
'Ping' the client to see if it is still up. If the client quits while the pipe is open, the server will get a sigpipe when it tries to write to the socket.
By your slightly confused explanation I am guessing that you haven't firmly settled on what you want to do. I recommend do what is easiest, which may involve patching the original program.
____________________
Jeremy
I didn't believe in evil until I dated it. |