RiddleActive Record as a Rule Engine

time to read 1 min | 200 words

I mentioned in a previous post that I used Active Record as a Rule Engine, and a couple of people asked just how. Before I will post the answer, I want to see if you can come up with the same idea.

The scenario:

A rule engine that can process big amount of data. The engine will run as a Windows service, and not as a part of another application.
Throughput is important, as well as flexibility in the rules and what they can do. The processing of each rule can be quite complex, so it is important that the rule engine will not limit what the rule can do.

Hints:

  • A database is really good in filtering data.
  • Active Record (well, NHibernate, but it is the same thing) can take inheritance to the database level.

More posts in "Riddle" series:

  1. (12 Oct 2010) File access & Multi threading
  2. (06 May 2010) String outputs
  3. (02 May 2010) Hard links & file moves