Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

first I must apologize for being newbie to Perl and asking more general question.
I'd like to implement event/action processing engine in Perl and don't know whether some similar projects already exists where I could learn/expand from...

I'd like to have :
- simple config file (maybe xml format) with criteria (expressed as expression of logically tied events)
- responding (possibly complex) actions when criteria is met...

It should be pretty straighforward to add/edit/delete actions from config file and also process the rules from file...

Any project or code snippet to get me starting ?

Thanks in advance for your wisdom,

regards,

Rob.

for instance : if (motion_detected and (night or lowlightlevel) then (turnlight on and beep))
  • Comment on How to implement event/action processing engine?

Replies are listed 'Best First'.
Re: How to implement event/action processing engine?
by Corion (Patriarch) on Dec 04, 2008 at 11:01 UTC

    In a way, such a framework is already written for you in Workflow, but the configuration language is XML.

    In another way, you might fare better with using Prolog or AI::Prolog (or better the Perl bindings to SWI Prolog), depending on how you structure and write your criteria and whether you want a procedural logic flow like a sequence of if statements (first matched hits) or whether you want to find all matching clauses.

Re: How to implement event/action processing engine?
by Fletch (Bishop) on Dec 04, 2008 at 13:24 UTC

    POE provides an event framework that you also might want to look into building on top of.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: How to implement event/action processing engine?
by zentara (Cardinal) on Dec 04, 2008 at 13:42 UTC