tag:blogger.com,1999:blog-3302102753324425376.post1698114718530936229..comments2023-12-21T04:36:53.782-08:00Comments on 51 Elliot: A Policy of SimplicityDarrenhttp://www.blogger.com/profile/00230771763285373052noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3302102753324425376.post-27135260824392695332008-07-14T15:50:00.000-07:002008-07-14T15:50:00.000-07:00Hi Woolfel,Thanks for the clarification. The examp...Hi Woolfel,<BR/><BR/>Thanks for the clarification. The example is admittedly an over-simplification. However, most readers don't want the "many years" approach to wrapping their heads around RETE. I'm somewhat skeptical of its claims; in my experience it has not performed as well as other technologies that are used in Service Oriented Architectures.<BR/><BR/>Perhaps when you're dealing with very large rule sets (you mentioned thousands of rules, and hundreds of thousands of facts) RETE comes into its own.<BR/><BR/>Thanks for reading and taking the time to comment...Darrenhttps://www.blogger.com/profile/00230771763285373052noreply@blogger.comtag:blogger.com,1999:blog-3302102753324425376.post-45118229807411306322008-06-24T16:39:00.000-07:002008-06-24T16:39:00.000-07:00I was googling on "RETE algorithm" and came across...I was googling on "RETE algorithm" and came across your entry. I think your description of RETE is incorrect. I don't know if you've read Dr. Forgy's thesis or follow up paper.<BR/>In the literature, naive implementations refer to classic decision tree techniques, which uses many of the same ideas as compiler theory. I've seen commercial rule engines that compile a rule literally. By that I mean it doesn't perform any optimizations to remove redundancy. The following statement about RETE is incorrect.<BR/><BR/>"All a Rete algorithm really does is take a collection of rules, break them into smaller criteria, and build an edge-node graph that helps eliminate redundancy in the logic."<BR/><BR/>RETE does not build an edge-node graph, atleast that's not how I think of it. What RETE does is it groups the conditions by object type and avoids checking all nodes in the network. The other thing it does is remember the matches so that if there are thousands of rules and 500,000 facts, it avoids recomputing all partial matches. RETE will only calculate the delta.<BR/><BR/>If you really want to see how RETE compiles rules, i would suggest playing with JESS, Drools or Jamocha. All of them provide a viewer, which will show you exactly what the RETE network looks like.<BR/><BR/>Understanding RETE takes years of dedication and isn't something a person can learn in a few days, weeks or months. In case you're wondering, I'm the author of Jamocha, which is a RETE rule engine. I highly recommend trying JESS and drools to get a better understanding of how RETE really works.woolfelhttps://www.blogger.com/profile/13814445471254728002noreply@blogger.com