Folks, I am currently trying to scale our implementation by farming out request into mutliple threads. I am on a 4 CPU Mac. A few things I am wondering about: 1. Although I see an increase in CPU load when going from single to multi-threaded processing the throughput increased marginally. I am pretty sure that my measurements are correct. I have checked the GC and this is not the source of congestion. My question here is whether Drools is using lot's of synchronization that may explain this. 2. When I share the RuleBase accross threads (which I think is valid?) I get interesting errors during execution. eg:
org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org .drools .rule .PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:246) at org .drools .common .TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java: 200) at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:150) at org .drools .reteoo .CompositeObjectSinkAdapter .propagateAssertObject(CompositeObjectSinkAdapter.java:318) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java: 153) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java: 192) at org .drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71) at org .drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java: 909) at org .drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java: 881) at org .drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java: 682) at xxxx.DroolsPD.validate(DroolsPD.java:66) at xxxx.DroolsMTRunner.run(DroolsMTRunner.java:30) at java.lang.Thread.run(Thread.java:552) Caused by: org.mvel.CompileException: cannot invoke getter: getSAClass [declr.class: xxx.AbstractSA; act.class: null] at org .mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java: 52) at org .mvel .optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java: 39) at org .mvel .ast .VariableDeepPropertyNode .getReducedValueAccelerated(VariableDeepPropertyNode.java:22) at org .mvel .ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21) at org .mvel .ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21) at org.mvel.MVELRuntime.execute(MVELRuntime.java:88) at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111) at org.mvel.MVEL.executeExpression(MVEL.java:235) at org .drools .base .mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36) at org .drools .rule .PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240) ... 13 more Caused by: java.lang.NullPointerException at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:324) at org .mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java: 42) ... 22 more Details: * I use StatelessSessions which are private to the threads * No data is shared between threads (with the exception of the RuleBase, as outline above) * I am on JDK 1.5 I would be grateful for any pointers for 'correct' use of Drools in an MT environment. Cheers, Ingomar -- Ingomar Otter Chief Technology Officer mailto:[EMAIL PROTECTED] Mobile: +49 172 2367867 Valtech GmbH Bahnstraße 16 40212 Düsseldorf Germany Phone: +49 (0)211 179237-0 Fax: +49 211 179237-19 http://www.valtech.de Geschäftsführer: Ingo Kriescher Amtsgericht Düsseldorf HRB48672
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users