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.


In reply to Re: Re: Re: Notifier - Server by jepri
in thread Notifier - Server by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.