Yes, that's another option too.. it really depends on how you can accumulate data or split your data to be analyzed. Cheers
On Thu, Jun 14, 2012 at 1:22 PM, Vincent LEGENDRE < [email protected]> wrote: > May be you can think differently : Instead of keeping all objects for 90 > days, keep only the accumulate results for each previous day. > > ----- Mail original ----- > De: "chrisLi" <[email protected]> > À: [email protected] > Envoyé: Jeudi 14 Juin 2012 18:06:50 > Objet: [rules-users] Is a single StatefulKnowledgeSession with Distributed > Memory cache possible? > > 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 > memory. > > I have been blocked here for a long time! Is it possible to distribute a > single StatefulKnowledgeSession in multiple JVMs or machines using > Distributed Memory cache such as Hazelcast? If yes, could you give me some > opinion on the solution? Or is this the problem the Drools Grid project try > to handle? Or there are other techonology to handle large numbers of facts > or events problem? > > As far as I know, Drools Grid distribute multilple ksessions on multiple > machines in the Grid, each or several kseesions on one node? Is my > understandings right? > > Any response or opinion from you will be appriciated! Thank you very > much! > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Is-a-single-StatefulKnowledgeSession-with-Distributed-Memory-cache-possible-tp4017968.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > -- - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio -
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
