RE: [soar-group] rule systems for crontab and active databases?

"Karl B. Schwamb" <[email protected]> Fri, 27 Jan 2006 14:50:53 -0800
Newsgroups gmane.lisp.lisa.general
Message-ID <20060127224832.ULWY26964.fed1rmmtao08.cox.net@COLONNADE3>
Some comments on #2:

Any rule engine with a decent Rete implementation will do just fine for
executing business rules.  They scale well and will usually out-perform DB
triggers.  Getting data into the engine isn't a problem either since you can
use standard interfaces that couple to the engine's API.

Letting users define their own rules is the hard part of your request.  The
first part depends on being able to load rules dynamically.  This can be
done by an engine that supports run-time rule definition.  You have choices
ranging from open source Soar to commercial products like ILOG's JRules.  

The second, and less mature, part is the authoring environment.  You have to
define a tool that lets the users manage the full lifecycle of business
rules: create, organize, view, edit, delete, etc.  Part of the lifecycle is
also defining the data set and actions the rules can reference.  You may
want to let them define flowcharts of interconnected rule sets if you
believe they would have trouble understanding how to create and use
intermediate facts.  Due to the complexity of the area, some product
developers just draw a small sandbox of data and rule types that the users
can edit (e.g., thresholds on stock prices that can trigger a small set of
buy/sell actions).  This allows progress to be made without solving the
tougher, more general, problems of rule authoring.

-Karl
 
Karl B. Schwamb
Colonnade Software, Inc.
http://www.colonnadesoftware.com/
[email protected]
949-933-4307
 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrew
Piskorski
Sent: Friday, January 27, 2006 1:55 PM
To: [email protected]; [email protected];
[email protected]; [email protected]
Subject: [soar-group] rule systems for crontab and active databases?

First of all, please note the cross-posting above.  I believe it is
appropriate in this case, as my questions apply equally to CLIPS,
Lisa, and Soar.

I am interested in the use of forward-chaining rule systems in non-AI
systems, particularly for "active databases".  The two use cases I
particularly have in mind are:

1. A much more powerful cron/crontab scheduler replacement.
2. Rich business rules which respond automatically to real-time
   financial market data.

First I'll list some questions for you folks, then go on to discuss
the the two use cases which inspired them:

How well does your system respond to rapidly changing facts?  Can it
change its rules on the fly?  Will it still perform adequately if the
rules change rapidly?  Any useful rules of thumb for just how MUCH
changing of facts and/or rules your system can support?

Is there a good way to make your system time-aware, like cron is?  How
would you do it?

Do you know of anyone implementing a more powerful crontab-like system
before?  If not, how would recommend that someone go about doing so?
Do you think your forward-chaining rule system tools suitable for this
use?  Why or why not?

Do you implement any forward-chaining algorithms other than Rete,
e.g., Leaps, Treat, or Rete* ?  Why or why not?

Any other systems I should look at that I've missed?

And finally, what are fundamental similarities and differences between
your systems and others, and when and why are these significant?  Why
would someone choose to CLIPS vs. Lisa vs. Soar?

Now, the use cases:

1. A much more powerful cron/crontab scheduler replacement:

On Unix, the cron daemon and crontab files are the typical tool for
scheduling jobs to run periodically or at particular times.  This is
useful, but woefully limited in its expressive power.  What I really
want instead, is some tool which, via a programming language, can
express dependencies and constraints between scheduled jobs, integrate
integrates tracking of and actions on job success or failure, etc.

E.g., "Run job A immediately after both jobs B and C successfully
finish.  If job A fails, run job X.  Run job B at the first Monday of
each month, at these times throughout the day..."

It seems to me that a forward chaining rule system should be suitable
for building such a smart cron system, *IF* (among other things) it
has a good way to model and react to the passage of time.  However, so
far I haven't been able to find any info about modeling time and
constraints in such environments, nor any examples of a more powerful
crontab-like system using such tools.

2. Business rules which respond automatically to real-time financial
   market data:

I am interested in taking real-time financial market data (e.g.,
prices of securities) and filtering them through business rules which
trigger arbitrary actions - trade execution, alerts, changes in the
rules, whatever.

Years ago, as part of a larger project, my team actually did implement
a simple version of that.  Fortunately we were only dealing with a
modest amount of streaming data (selected bond index options), so we
simply stuffed all the data it into our Oracle database as it arrived
and then fired triggers based on the data.

That is not a generally useful solution.  It probably would have had
severe performance problems with larger amounts of or faster incoming
data.  Just as bad, RDBMS triggers (in Oracle, PostgreSQL, etc.) have
lots of drawback and limitations, and do NOT provide a very good
language substrate for this kind of job.

E.g., it would be very, very nice to allow sophisticated end users to
define their own rule-based triggers, but our old Oracle trigger
system CERTAINLY could not support that.  We could only offer certain
pre-defined canned rules ("If option price X moves by more than Y%,
suspend all my pending orders!"), and even then we had to carefully
pick what rules to implement so as not to run afoul of recursive
trigger problems and other limitations.

3. Finally, here are some additional links which may be of interest:

These old threads give some links related to the financial market use
case for forward-chaining systems, etc.:

  http://openacs.org/forums/message-view?message_id=44805
  http://openacs.org/forums/message-view?message_id=113190

Various cron systems - AFAIK none of these do what I want:

  http://fcron.free.fr/
  http://www.gentoo.org/doc/en/cron-guide.xml
  http://saturn.sourceforge.net/about.php

Some daemon launcher tools - even more limited than the cron systems
above:

  http://cr.yp.to/daemontools.html
  http://arstechnica.com/reviews/os/macosx-10.4.ars/5
 
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/laun
chd.8.html

Other projects (some of them very old or defunct) which are more or
less related include Aditi, Venus-DB, Mozart/Oz, Mercury, and of
course various Prolog systems:

  http://www.cs.mu.oz.au/research/aditi/
  http://www.cs.mu.oz.au/research/mercury/
  http://www.cs.utexas.edu/users/venus/
  http://www.cs.utexas.edu/users/miranker/treator.htm
  http://www.mozart-oz.org/
  http://www.cise.ufl.edu/~sharma/research/active.html
  http://itlab.uta.edu/sharma/Projects/Active/index.htm

Thanks for your time and input!

-- 
Andrew Piskorski <[email protected]>
http://www.piskorski.com/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
soar-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soar-group



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642