I'm curious if anyone has any suggestions on handling the following 
situation:

I have a knowledge base in my program, the Jess Rete object. The program 
receives a message and feeds it into the knowledge base so it can be 
interpreted properly. The program then looks for certain facts in the 
knowledge base (ie: a query defined by the message) and acts 
accordingly. Once the message is processed, I want to rollback the rete 
to the state it was before the message came in so the rete won't grow 
too big as I continue to receive messages. Complicating things, messages 
might be coming in concurrently. I understand that the rete's methods 
and parts are synchronized and thread safe (correct?). However, it does 
mean that I can't do something simple like count the number of facts 
before the message, count the number afterwards and subtract the 
difference from the tail of the facts list. I was thinking of cloning 
the rete for the message handler so it can't touch the original. This 
sounds potentially slow, but not nearly as slow as reading in all the 
facts to initialize the kb. It does sound difficult though. It's not 
clear to me just what that would entail, how many links the rete has and 
so forth. Would it be not worth the effort and easier to just assert a 
ton (couple hundred) facts into a new Rete everytime a message comes in?


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