Is a single StatefulKnowledgeSession with Distributed Memory cache possible?
2012-06-14 16:06:50 GMT
Hi All,
I am working on a banking fraud detection project with Drools Fusion,
which will match a transaction against hunreds of rules to check whether the
transaction is suspicious.
In some rules, I use time-based sliding window to calculate the average
transaction amount of an account in the past 3 or 6 months. One possible
rule will be as below:
rule "Single Large Amount Transaction"
dialect "mvel"
when
$account : Account($number : number)
$averageAmount : BigDecimal() from accumulate(
TransactionCompletedEvent(fromAccountNumber == $account.number,
$amount : amount)
over window:time(90d)
from entry-point TransactionStream,
bigDecimalAverage($amount))
$t1 : TransactionCreatedEvent(fromAccountNumber == $account.number,
amount > $account.creditAmount * 0.5, amount > $averageAmount *
3.0)
from entry-point TransactionStream
then
end
In such cases, the Fusion Engine will hold TransactionCompletedEvent in
its memory for 90 days. And we have about 1 billion Accounts in total, so
the TransactionCompletedEvent will be huge, we will very soon run out of
(Continue reading)
RSS Feed