Filtering and ordering 100000 records - Is rule engine a right solution?

Oct 5, 2011 at 10:55 AM

I have a set of records which have to be filtered and then ordered

The filtering and ordering logic needs to be configurable by business users

Can Rules Engine.NET solve this problem?

I would like to know the performance aspects of the same as I would be transporting and loading the entire 100K records to the business layer to validate against the rules.

Or is it advisable to do the entire stuff in stored procedures? Im on SQL Server 2005. 

Coordinator
Oct 7, 2011 at 12:23 AM

Unfortunately, no. Filtering and Ordering is not what the Rules Engine was built for. (I would look into Entity Framework and using custom Linq Expressions to query/filter/order data.)

To validate recordsets however, combining EF and Rules Engine would be excellent. Of course, it would mean transporting 100k of records to the Business Layer (Note that doesn't mean you have to load them all up at the same time).

As far as speed goes, the rules engine uses compiled linq expressions to access properties, and pass them through to rules objects (which you can create more of yourself).

Using a stored proc to do the lot is surely faster, but of course you end up with business logic in your database, which is not a very good model...

Hope this helps.