2

I have a customer management system used by businesses to store customer data and some other info. I want my system to send an email to the user (business owner) in several cases like the following:

  1. If one week after the signup the user (business owner) did not enter customers to the system - send him an email reminding him to add customers. Make this a weekly/monthly reminder.

  2. If the user reaches a milestone (e.g. 100 customers in the system) send him a congratulation email, but don't do it if he reaches the same milestone again (e.g. by deletion and addition).

Edit - 3. Send a "happy holiday" email a week before a holiday (giving this example mainly since it's the simplest one that illustrates dependence on a property of an event, not the user).

I need a system which would allow easy addition of rules based on previous/future events (future events have a known date) and user properties. I read a little about rules engines and events processing but still not really sure what class my problem belongs to.

Would be great to hear about specific recommendations for rules\events processing modules I could use. I'm thinking either Drools or Esper but both seem pretty complex and I want to be sure it's the right fit before investing time in adding them to my system.

I'm using Java and Hibernate if it matters.

Alex
  • 1,041
  • 3
  • 14
  • 32
  • Why not keep it short and simple? Create your own rule engine and configure rules through an XML? Your requirement is pretty straight forward for a need to use a framework. – Chetan Kinger Sep 29 '12 at 07:21
  • It's possible but feels somewhat like reinventing a wheel, and probably running into all the possible pitfalls that a solid existing framework has already dealt with. The examples above were basic illustrations but if the system grows rules may get more diverse, for example require use of functions like sum/avg or triggering based on previous events. – Alex Sep 29 '12 at 07:41
  • Drools is not implicitly efficient. You may not get the desired performance if you don't do it right. Also, regardless of whether you use Drools or not, you can never develop a system that is future proof. You can't possibly account for all the possible types of rules that may be required to be configured in the future with or without Drools. – Chetan Kinger Sep 29 '12 at 08:23
  • These look more easily accomplished by a scheduling engine than a rule engine – Anshu Sep 29 '12 at 08:28
  • Anshu you have a point, but isn't an event processing engine (e.g. Esper) also implicitly a scheduling engine? Pure rules engine does seem like less of a fit, agree with you there. Edit - since the rules are based on events and user properties I do feel we need something more than a simple scheduler. – Alex Sep 29 '12 at 08:49
  • Edited the question and added a 3rd example to illustrate possible dependence on the properties and timing of the event itself (not just the user). – Alex Sep 29 '12 at 09:40

0 Answers0