All good questions. I'm early enough in the cycle that I haven't made the decision on a lot of this stuff yet, but, here goes :
  1. External events will prob. be either via signals for occasional triggers, or using sockets for regular changes.
  2. Whether to iterate over all rules is really a performance issue. One option is a register of variable that would change per rule, so on a change, only those affected would need to be evaluated. I expect the eval loop to be so quick though that this won't be needed initially
  3. Picking up rules - There would be a set of startup rules. Some would need to be created dynamically. My ideal would be to parse non-Perl expressions and interpret them.
  4. Triggers on DB columns - I considered this, but don't want the business logic encoded in the DB. What would be ideal is for e.g. a new/changed row in a DB to trigger an external event to prompt the Watcher to reevaluate. The DB will be MySQL, not sure if this would be possible with callbacks. May need some homework.

In reply to Re^2: Event loop with rules handling by Brovnik
in thread Event loop with rules handling by Brovnik

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.