Jess users,

        I have a web application running a pool of Rete objects on the
server.  Each new user session retrieves a Rete object from the pool and
uses it as a rules engine for the duration of the session - the engine must
be 'stateful' for the life of that session.

        This design appears to be prohibitive due to the memory footprint of
the rules engine.

        My rule set contains approximately 200 rules, 150 defclasses and
deftemplates, 10 defglobals.  The engine, with only the rules and about 10
initial facts, is about 2 MB.  The Rete Object itself, without my rules,
appears to be about 700K (does that sound right?).  

        Each rule, on average, contains 3 patterns - I've paid close
attention to the guidelines I've read on writing rules that will
pattern-match efficiently, and sharing of input nodes.  The defclasses
contains 11 - 16 slots.  Rules that match on definstances of these facts
only care about 4 or 5 of those slots.  There is some use of inheritance
between deftemplates and defclasses.

        I am using Jess 5.1, JDK 1.1.8, on Windows NT.

        At 2 MB per session just at initialization, the server will
certainly run into memory problems with any kind of moderate load .

        I've read through various threads on this list where the trade of
'speed for space'.  Indeed, the performance I'm seeing for each run() of the
engine is excellent, but the memory usage is not feasible.   

        I've read about the alternative of using 1 rules engine with
session-specific facts, but it is too late for me to explore that option
        (plus, the saturation issue and need to cleanup the session-specific
facts worry me).

        I'm looking for any suggestions to cut down the memory  footprint.
Even pointing me to threads on this mailing list I might have missed would
be appreciated.  

        Thanks,
        Michael Lucero



---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to