[rules-users] CEP : events not being expired when they should

2011-06-06 Thread radai.rosenblatt
Hi.

this forum post relates to (at least) 2 drools issues: JBRULES-2881 and
JBRULES-2862.
while trying to verify the fixes (both issues are marked fixed in
5.2.0.CR1), i've created 2 drl files:

the 1st file tests event retention for length windows:

package contrived.example

import contrived.example.Event
import contrived.example.Fact

declare Event
@role(event)
end

rule "match event with fact"
when
Fact($id : id)
Event (factId==$id) over window:length(1) from entry-point "Event
Stream"
then
//do nothing
end

the test code for this looks something like:

session.insert(new Fact(...));
eventStream.insert(new Event(...));
session.fireAllRules();
clock.advance (1 year);
eventStream.insert(new Event(...));
clock.advance(1 year);
session.fireAllRules();
//1st event is still in memory at this point <--- bug?

the 2nd file tests the 2-events-from-window scenario in #2862:

package contrived.example

import contrived.example.Event
import contrived.example.Fact

declare Event
@role(event)
end

rule "match 2 events"
when
$e1 : Event () over window:time(15m) from entry-point "Event Stream"
$e2 : Event (this before $e1) over window:time(15m) from entry-point
"Event Stream"
then
//do nothing
end

the test code is something along the lines of:

session.insert(new Event(...));
clock.advance(1 minute);
session.insert(new Event(...));
session.fireAllRules();
clock.advance(1 day);
session.fireAllRules();
//both events still in memory at this point <-- bug?

i ran these tests using drools 5.2.0.CR1, and they both failed. am i doing
something wrong ? were the issued fixed later than JIRA indicates ?

i'm attaching the maven project i built for these tests (it has a few other
tests as well, not related to this port. the test cases that do relate to
this post are TestLengthWindowRetention and TestTwoInWindow, they both fail)
so other people can run them as well.

http://drools.46999.n3.nabble.com/file/n3028890/drools-cep-retention.zip
drools-cep-retention.zip 

--
View this message in context: 
http://drools.46999.n3.nabble.com/CEP-events-not-being-expired-when-they-should-tp3028890p3028890.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] CEP : explicit @expires() vs window

2011-06-05 Thread radai.rosenblatt
if i have the followng drl code:

package contrived.example

import contrived.example.Event
import contrived.example.Fact

declare Event
@role(event)
@expires(10s)
end

rule "match event with fact"
when
Fact($id : id)
Event (factId==$id) over window:time(15m) from entry-point "Event
Stream"
then
//do nothing
end

how long should an Event live in memory? 10 seconds or 15 minutes?

--
View this message in context: 
http://drools.46999.n3.nabble.com/CEP-explicit-expires-vs-window-tp3028871p3028871.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Looking for training/guides/books about drools C.E.P scalability

2011-01-30 Thread 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-guides-books-about-drools-C-E-P-scalability-tp2383478p2383478.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Writing a pattern in which each event constraint depends on the previous event

2011-01-29 Thread radai.rosenblatt

how about numbering your ticks ?
as a rough outline, this might look something like:

1st : Tick ($number : num)
2nd : Tick (num == $number+1, {this.value below 1st.value})
3rd : Tick (num == $number+2, {this.value above 2nd.value})

this should find all "bottoms"

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Writing-a-pattern-in-which-each-event-constraint-depends-on-the-previous-event-tp2370165p2382430.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users