[rules-users] Is there a faster way of doing this in Drools ?

soumya_sd soumya_sd at yahoo.com
Wed May 9 13:52:11 EDT 2012


laune wrote
> 
> Merely filtering a subset of data items from a collection according to
> user's changing needs and whims is NOT the primary use case of a
> production
> rule system.  This kind of problem has been solved adequately and
> efficiently by SQL queries or some similar DB query technique.
> 
> It is true that such filtering rules, if compiled and stored in a
> KnowledgeBase, can achieve the same thing, but, since rules are targeted
> at
> a more sophisticated use cases, this will never be as efficient as a
> simple
> query system.
> 
> -W
> 
> 

you bring up an excellent point. 

What if the data is streaming in nature and is not stored in a database and
outside of your control. 

 
Another approach is to cache the data locally (in a database) and then use
SQL to filter it. 

I decided not to use the database approach because of two reasons. 

1. The database write operation may be expensive. 
2. In the future I may decide apply more complex consequence to my rules
than just filtering. 

Thanks. 

--
View this message in context: http://drools.46999.n3.nabble.com/Is-there-a-faster-way-of-doing-this-in-Drools-tp3973888p3974856.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list