Looking for training/guides/books about drools C.E.P scalability
by radai.rosenblatt
Hi.
The company I work for is evaluating drools for use in an event analysis
engine, to be based on drools fusion, and I was tasked with evaluating
Drools for that purpose. I've read a couple of books that deal with drools,
in addition to various articles, guides, and tutorials, but could not find
any guides to drools scalability. the references i could find usually deal
with trying to partition a problem into "orthogonal" sessions running on
different nodes, but i could not find any treatment of CPU requirements,
memory consumption estimates, or single-session scalability concerns, and
when I tried a couple of experiments on my own the results were quite
alarming (see https://issues.jboss.org/browse/JBRULES-2845 - possibly a
threading bug?, and https://issues.jboss.org/browse/JBRULES-2862 - a memory
leak).
Im looking for any training course / book / guide dealing with fusion
scalability. the aim, eventually, is to reach a throughput of 10M
events/day, most probably feeding into a single session. any course / book /
training recommendation would be very welcome.
Radai.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Looking-for-training-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Problem implementing multiple evals
by Ayush
When I'm trying to execute multiple evals I'm getting errors. Below is what
I'm trying to do
MyEvent(prop1="XYZ") over window:time(1m) from entry-point
MyStream
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i1 : doubleValue)
from accumulate(
MyEvent(
prop1 == "CONNECT",
prop2 == 3,
eval((prop3 matches ("match "+getFirstNameRegex()+"
Connect")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i1 > getNodeCount()*0.35))
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i2 : doubleValue)
from accumulate(
MyEvent(
prop1 matches "(second|Third{1}_CONNECT",
prop2 == 1,
eval((prop3 matches
("MatchOne|MatchTwo){1}::"+getMMSCNameRegex()+", failure")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i2 > getConnectionCount()*0.4))
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i3 : doubleValue)
from accumulate(
MyEvent(
prop1 matches "(E1|E2){1}_CONNECT",
prop2 == 3,
eval((prop3 matches ("REPT (one|five|seven){1}::
"+getServerID()+" is down")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i3 > getThirdNodeCount()*0.5))
When I'm trying to execute the above LHS I get
org.drools.rule.InvalidPatternException: Required Declarations not bound:
'$i1'.
I even tried using below approach
AlertReceivedEvent() over window:time(1m) from entry-point
NotificationStream
$I1 : Double() from getIsgNodeCount()
Number(doubleValue > $I1) from accumulate(
AlertReceivedEvent(
entity == "NPMMS_NE_CONNECT",
probableCause == 3,
eval((specificProblems matches ("REPT ISG
NPMMS::Unable to connect to "+getPxmmsNameRegex()+" node: PXMMS")) == true)
) over window:time(1m) from entry-point
NotificationStream, count()
)
But when I'm placing parentheses () around it, it throws exception stating
mismatched input '$I1' expecting ')' in rule. For now I'd placed these 3
statements in separate rules. Can anyone please help me solving it? Thanks
in advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-implementing-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Loading enums programmatically in guvnor
by drools10
Hi,
I am a newbie to drools/guvnor. I am trying to populate a drop-down list
in guvnor rule generation with preconfigured values(which would come from
database).
I tried to populate the titles property of AgeTest class with values from
loadData() method of AgeValues class.
In the new Enumeration I gave: titles=(new
com.guvnor.AgeValues()).loadData();
My classes are as below:
public class AgeTest {
private List<String> titles = new ArrayList<String>();
public List<String> getTitles() {
return titles;
}
public void setTitles(List<String> titles) {
this.titles = titles;
}
}
and
public class AgeValues {
public Map<String,List<String>> loadData() {
Map<String,List<String>> data = new HashMap<String,List<String>>();
List<String> titleValues = new ArrayList<String>();
titleValues.add("title1");
titleValues.add("title2");
data.put("AgeTest.titles", titleValues);
return data;
}
}
I get the following error while validating the enumeration: "The expression
is not a map, it is a java.util.ArrayList".
Can anyone please guide me in this regard. I even tried to have titles field
as a map, but same issue.
I copied the 2 classes to my guvnor/web-inf folder.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Loading-enums-program...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Sliding length window of (1) equals latest event?!
by OlliSee
Hey again everyone,
I seem to be having another problem.
When I have a rule like that
when
A() over window:length(1)
B() over window:length(1)
then
...
I imagine now having two windows of length 1. One always keeping the latest
A event and one always keeping the latest B event. And I expect them to
update themselves once a new event comes in.
But if I have events coming in like this...
A1, A2, B1
The rule fires for (A2, B1)
then another event B2 is coming in and it fires for (A2,B2)
So far so good.
Then another event A3 is coming in and the rule fires for (A3,B2) and
(A3,B1).
Why? Shouldn't the B window only have B2 inside since it arrived and thus
fire only for (A3,B2)?
I have already been searching for this problem, found this
http://drools-java-rules-engine.46999.n3.nabble.com/DROOLS-problem-with-s...
but I'm not sure if this is the same problem as mine.
Helping me understand this is highly appreciated, since I thought I had
completely understood the window behaviour.
Thanks in advance.
Kind regards
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Sliding-length-window...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Newbie question on how to use drools with seam
by Rex Na
Hi,
I'm new to drools and having troubles in using drools with seam framework.
Specifically speaking,
I have the following tables(namely entities):
User table:
Long id,
String name,
List<AccountPermission> permissions
AccountPermission table:
Long id,
User user,
Account account
Account table:
Long id,
Long name,
Set<Comment> comments
Comment table:
Long id,
Account account
and my drl file:
rule "insertCommentRule"
no-loop
when
$check: PermissionCheck(target == "commentHome", action ==
"insertComment")
Principal($username: name)
<...........more rules should be put here>
then
$check.grant();
end
Lastly, I have an action in CommentHome, a seam component with name
"commentHome" and this action is used to insert a comment.
As above, I understand some rules can be put there to control whether the
current user is authorised to insert a comment. However, I have failed in
many different ways.
I looked through seam books and reference as well. Nothing really explained
clearly on how to do a process control with seam components.
All I wanna do is to check whether a user who just log in with valid
credentials have permissions to insert comments. It's really hard for me to
get to that point. So could anybody show me how to do it with seam? I really
appreciate it. Thanks in advance.
13 years, 10 months
Writing a pattern in which each constraint for an event depends on the previous event
by OlliSee
Hello everyone.
Lets say we have StockTicks...
Is it possible to detect a monotonically decreasing StockTick stream over a
window?
If I knew the number of events I want to check on, I'd do it this way
$a : StockTick() over window:time(20s)
$b : StockTick(this after $a, price < $a.price) over window:time(20s)
...
But I don't know for how long the StockTick prices continue to decrease..
I imagine doing something like that
$list : List(size > 0) from collect(StockTick() over window:time(20s))
forall($a : StockTick() from $list
$b : StockTick(this after $a, price < $a.price from $list
)
That results in a nice exception.
Any idea how to do this work? And more efficiently than my approach?
Thanks
Oliver
Exception in thread "Thread-1" java.lang.ClassCastException:
org.drools.common.DefaultFactHandle cannot be cast to
org.drools.common.EventFactHandle
at
org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:336)
at
org.drools.rule.VariableRestriction.isAllowedCachedLeft(VariableRestriction.java:110)
at
org.drools.rule.VariableConstraint.isAllowedCachedLeft(VariableConstraint.java:115)
at
org.drools.common.DoubleBetaConstraints.isAllowedCachedLeft(DoubleBetaConstraints.java:166)
at
org.drools.reteoo.FromNode.checkConstraintsAndPropagate(FromNode.java:274)
at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:138)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:220)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:81)
at
org.drools.reteoo.FromNode.checkConstraintsAndPropagate(FromNode.java:279)
at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:138)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:220)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:81)
at
org.drools.reteoo.AccumulateNode.evaluateResultConstraints(AccumulateNode.java:662)
at org.drools.reteoo.AccumulateNode.assertObject(AccumulateNode.java:270)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1187)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1089)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:893)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:238)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Writing-a-pattern-in-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Drools Flow persistence to HBase
by Daniel Nathanson
Has anyone ever tried to persist Drools Flow processes to HBase (or
some other NoSQL DB)? We are working on a cloud-based system sitting
with HDFS and HBase for storage. We would rather not introduce a
RDBMS into the architecture simply to support Drools Flow's JPA
requirement for persistence.
I've looked at datanucleus' JPA implementation which can talk to
HBase, but from my limited knowledge of JPA, it doesn't look like
their JPA for HBase implementation supports the Drools JPA
requirements. Specifically, HBase does not support generation of
record IDs, joins, or inner selects. Similarly, it doesn't look like
the Hadoop JDBC driver (with Hibernate) will work for the same reasons.
Regards,
Dan Nathanson
13 years, 10 months