tag:blogger.com,1999:blog-5869426.post6587396855337090223..comments2024-03-25T09:15:58.430+00:00Comments on Drools & jBPM: Symmetrical and Asymmetrical ReteMark Proctorhttp://www.blogger.com/profile/03304277188725220501noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5869426.post-14212531137107526182008-10-29T17:52:00.000+00:002008-10-29T17:52:00.000+00:00thanks for giving a great description of how it wo...thanks for giving a great description of how it works in 6.3. My memory of RETE/UL paper is a bit foggy, but it sounds similar to what you have in 6.3.woolfelhttps://www.blogger.com/profile/13814445471254728002noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-20568232363177473802008-10-28T00:29:00.000+00:002008-10-28T00:29:00.000+00:00In CLIPS, retract prior to 6.3 was asymmetric in t...In CLIPS, retract prior to 6.3 was asymmetric in that join tests did not have to be performed, but the partial matches in the beta memories did need to be searched in order to find the ones referencing the partial match from the alpha memory currently being deleted. In 6.3, the partial matches have links to their children so it is no longer necessary to search the beta memories for the associated partial matches.Gary Rileyhttps://www.blogger.com/profile/11146922677136720411noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-72672825219079535972008-10-27T23:59:00.000+00:002008-10-27T23:59:00.000+00:00thanks for clarifying that. Gary mentioned he was ...thanks for clarifying that. Gary mentioned he was playing around with ways to improve joins for 6.3. He is a generous person as well as a great guy in general. you deserve credit for getting that work in drools 5.woolfelhttps://www.blogger.com/profile/13814445471254728002noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-11488085898873344572008-10-27T19:10:00.000+00:002008-10-27T19:10:00.000+00:00"done independently of CLIPS 6.3".Drools 3, the fi..."done independently of CLIPS 6.3".<BR/><BR/>Drools 3, the first full Rete Drools implementation, had a form of asymmetrical Rete which was written independently, as at the time I was not able to understand the Clips code. However I wasn't happy with the memory consumption so reverted Drools 4 to classical symmetrical Rete. Drools 5, with Gary's help, I was able to copy identically (at least I believe I did) how Clips manages it's data structures for the pattern matching process. Clips provided the missing technique that enabled me to do what I was trying to do with Drools 3.<BR/><BR/>However I'm sure there is plenty here for you to draw your normal baseless and twisted conclusions with some fabricated information from the depths of your twisted mind and attack myself and the drools team - enjoy.Mark Proctorhttps://www.blogger.com/profile/03304277188725220501noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-82586450113530578112008-10-27T17:00:00.000+00:002008-10-27T17:00:00.000+00:00I highly recommend Gary's and dr. forgy's presenta...I highly recommend Gary's and dr. forgy's presentation. Congrats to gary and CLIPS on the excellent performance.<BR/><BR/>Correct me if I'm wrong, but drools 5 asymmetric was done independently of CLIPS 6.3. This is mostly an academic question, but isn't the design and implementation of asymmetric in drools 5 totally different than clips 6.3?<BR/><BR/>Since CLIPS uses linked list to begin with, doing asymmetric retract "should" a minor change. Is that correct gary?woolfelhttps://www.blogger.com/profile/13814445471254728002noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-42486866521169463962008-10-27T09:08:00.000+00:002008-10-27T09:08:00.000+00:00Ok. I'll wait for the Illation guys to include Dro...Ok. I'll wait for the Illation guys to include Drools 5 in their benchmarks ;-)Johan Lindberghttps://www.blogger.com/profile/13455767001846504270noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-92183703755524928622008-10-27T00:29:00.000+00:002008-10-27T00:29:00.000+00:00Johan: really don't know, will have to investigate...Johan: really don't know, will have to investigate another day, as we have to get 5.0 out for the moment.<BR/><BR/>Gary: heh, good point. I'll send Charles an email to see if he approves, or has more suitable terminology he would like us to use.Mark Proctorhttps://www.blogger.com/profile/03304277188725220501noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-19966085282321560592008-10-26T23:21:00.000+00:002008-10-26T23:21:00.000+00:00Doh! We should have thought to ask Dr. Forgy how h...Doh! We should have thought to ask Dr. Forgy how he would have named it. He mentioned in his talk that the rete algorithm had been designed with parallelism in mind, so perhaps there's a benefit to passing tokens for deletion in this regard. Ditto with what I've referred to as lazy computation of the not CE.Gary Rileyhttps://www.blogger.com/profile/11146922677136720411noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-55608226644883312192008-10-26T20:37:00.000+00:002008-10-26T20:37:00.000+00:00Hi again.I'm sorry I was so unclear. I understand ...Hi again.<BR/><BR/>I'm sorry I was so unclear. I understand that there's still a difference in speed. I was actually more wondering about the "shape" of the line in the diagram. Would Drools 5 still get the same "slope" between 64 and 128 guests or has that improved due to the algorithm changes?Johan Lindberghttps://www.blogger.com/profile/13455767001846504270noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-38241297286123616362008-10-26T19:40:00.000+00:002008-10-26T19:40:00.000+00:00While the main matching algorithm is the same, Cli...While the main matching algorithm is the same, Clips is still substantially faster and uses less memory. After talking to Gary at the conference, there are still some more tweaks I can make but it's minor. The rest of the code is due to Java really - cost of Objects and GC and lack of pointers. We might be able to improve further if we remove some of the OO approaches we make, not sure. I think the next main gain for us will be to compile the network down to bytecode methods, so it's no longer interpreted. I have a POC for this for alpha nodes, just need to get it working and also do beta nodes too. The bytecode stuff will be collapsed into a few methods with little indirection, so it'll show about as fast as we can get on Java, so we'll get a better idea of the cost. But Clips has Tuple/Token/PartialMatch (name depends on which system you use) recycling and very simple pointer referencing which I believe gives it a huge boost, plus it's Tuples are structs with stack allocation.<BR/><BR/>Long story short, no :)Mark Proctorhttps://www.blogger.com/profile/03304277188725220501noreply@blogger.comtag:blogger.com,1999:blog-5869426.post-20777492950142184712008-10-26T18:38:00.000+00:002008-10-26T18:38:00.000+00:00Hi Mark.So, does this mean that Drools 5 has simil...Hi Mark.<BR/><BR/>So, does this mean that Drools 5 has similar scalability performance as CLIPS 6.3 on, for example, the Ms Manners benchmark (see http://stage.illation.com.au/benchmarks/manners.2.html).Johan Lindberghttps://www.blogger.com/profile/13455767001846504270noreply@blogger.com