Hello,
I have following simple design.
I have a rulebase rb.clp. My java program (modified copy of jess.Main)
reads the file and loads all the rules and facts in an instance of Rule
Engine (jess.Rete). When a client calls with some data, these data are
asserted as facts and Rule Engine 'runs' corresponding rules that
it finds for those facts and retracts those facts. Client then 'fetches'
the result through Java API.
When another call comes, since none of the pre-existing facts were
altered, no '(reset)' is called and the new facts are asserted and
process continues. I keep the rule engine running by having some facts
always getting asserted and some rule which does nothing but sleeps (as
in Jess
FAQ) getting fired at fixed intervals.
Is this a typical of a Java application design that uses Jess for rule
evaluation? In some of the examples I read, reset was being called. But
wouldn't that necessiate reloading all the facts, and global variables
everytime? (of course, it makes sense if they change during a rule
evaluation). Would calling a 'mini-reset' that just resets only the
facts and global-variables that has changed be more efficient? Do I have
to retract these facts every time in the action part of the rule? Any
pointers for memory/speed optimization similar designs would be highly
appreciated.
Thanks for your help,
-Bijal Modi
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------