Let me explain what I am looking at.
I would like to write the main in java and invoke .clp files from java as this
gives us the flexibility of changing rules and not have to recompile the code.
I guess I have to use the same instance of Rete for executng rules.. Am
 I right!! If this is the case then I will have to synchronize the Rete object.
Another issue is if I have the a different LHS for each rule, but just a single
fact for each rule, what do u think would be the most appropriate way of
using the rules engine.. that works on Java objects.

Can I create a pool of Rete instances having the same...

Thanks,
Adarsh

friedman_hill ernest j wrote:

Well, setting aside the fact that a million rules (just the rules,
with no facts to match) would likely consume a gigabyte of memory or
so -- and the fact that I have no idea what you mean regarding "each
method on an object will have a corrsponding rule:"

As it says in the manual, performance is not a function of the number
of rules, but rather of the characteristics of the rules. Some
performance issues are discussed in manual Chapter 10 and
elsewhere. At one extreme, if every single rule's LHS is identical,
then the performance of a million rules is nearly the same as the
performance of one rule. If on the other extreme there is only one
kind of fact, but each rule has a distinct LHS that cannot be even
partially shared, then the performance of a million rules is 1/1000000
the performance of one rule.

For real systems, there are more than one kind of fact, and many rules
have somewhat similar left-hand-sides, so the reality is somewhere in
between. Performance often scales like the logarithm of the number of
rules if the rules are designed well and attention is paid to
parallelism.

Of course, there is no dependence whatsoever on the number of .clp
files read. You could put each rule in its own file, or all in one
file, and there would be no difference in performance (except for a
difference in startup time due to the overhead of opening a million
files! )

I think Adarsh Jain wrote:
> Hi,
> I would like some useful pointers on how to implement Jess in an env where we
> would a million rules.. meaning each method on an object will have a
> corresponding rule. What kind of performance can be expected wrt
> 1. The number of rules
> 2. The number of .clp files each having simple rules.
> Any help will be appreciated.
>
> Thanks,
> Adarsh
>
>

---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                 http://herzberg.ca.sandia.gov
Livermore, CA 94550

-- 
Adarsh Jain
Longitude Systems, Inc
Ph: 703-818-5436
 


Reply via email to