Memory usage is -very- dependent on the nature of the rules and the
size of the fact-list. Writing rules to minimize memory use is
conceptually simple: think of each rule as a laundry list. What Jess
does is collect all the 'partial matches' of facts to the lists of
patterns on rule LHSs. It starts from the top of a rule and works
down. Your job is to write rules such that Jess will generate the
smallest number of half-completed lists. Put rarely-matched patterns
near the top of the rules. Put the most specific patterns at the top
of the rules. These are the general guidelines. SOme experimentation
is generaly a good idea.

I think Duane Morin wrote:
> 
> Ok, the system I've built is thus: 
>    a fact "sentence" is asserted that contains a sentence (for example,
>    "tell me about 401k plans")
>    rules fire
>    as a result, facts are asserted that refer to product-specific concepts
>    that I have been able to extract from the sentence (in this case,
>      (match (concept KEYWORD)(type RETIREMENT-PLAN))
>      (match (concept PRODUCT)(type 401K))
> 
> I then use regular Java to grab these match facts and act accordingly.
> 
> Well, this is a web-based service.  So many people are gonna hit it at once.
> I'm currently looking into how to best implement the engine so that I 
> don't just have n copies of it running around.
> 
> Can someone give me a brief lesson (or tell me where I can get one) on 
> exactly what sort of memory performance Jess has?  If I have 3 rete 
> engines running around my memory space, is taht going to decimate it?
> What if I had 30 engines?
> 
> For the record, we're talking about what I think is a relatively small
> ruleset - less than 200 rules (probably ALOT less).  Also, the number
> of simultaneous users will probably not exceed a dozen.  So what I'm
>  thinking about is setting up a connection pool to a handful of engines
> (like maybe 3-5) and if it's necessary, just queue people's requests to
> use them.  Part of this, too, is gonna be how long a request takes to 
> finish, and I don't have that info yet. Right now it takes like 5 seconds,
> but that's on a slow box with non-optimized code.  
> 
> Duane
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


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

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to