I think [EMAIL PROTECTED] wrote: > > Is it possible to load/modify/delete rules while the rules engine is > running (e.g. after a call to (run-until-halt)) probably by calling > executeCommand at some point?
Yes, and it's not a big deal. Basically, we want hot-deployment of rules > after the user has edited them from our Java UI. It would appear that this > could be done with Jess' interpretive design with a combination of some > rules, saving and reloading of facts, possibly using the different events, > maybe replace the parser, or even some use of the activation > semaphore. This is actually much ado about nothing. You can simply add and remove rules at any time, with off-the-shelf Jess. It's safe and easy! Things are already synchronized properly such that you can define new rules while the engine is running. > > Is this recommended? Yep. > Are there any gotchas? Nope. > Will modifying rules on the fly be bad for performance? It's not a dirt cheap thing to do, but neither is it wildly expensive; see below. > I am assuming the rete network will be rebuilt. Most of the network won't change, and most of the matching won't need to be redone. If it's a brand new rule, new Rete nodes are added. If it's a redefinition of an existing rule, then the old one is removed (which may or may not result in nodes being removed from the network, as nodes are shared between rules) and then the new ones are added. Then all the facts are processed by (only) the new nodes. > Is there a recommended way of doing hot deployment? > Is there a better time to modify the rules during execution, say, specific > "idle" times during rules processing? No time is better than any other. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
