Alex Rivera | Logout

How to balance DRY principle with minimizing dependencies?

Asked 2009-08-07T01:19:40.303
10

I'm having a problem with the DRY principle (Don't Repeat Yourself) and minimizing dependencies that revolves around Rete rules engines.

Rules engines in large IT organizations tend to be Enterprise (note the capital "E" - that's serious business). All rules must be expressed once, nice and DRY, and centralized in an expensive rules engine. A group maintains the rules engine and are the keepers of the rules sets.

When that IT organization is part of an American insurance company, there tend to be lots of rules. There are rules that apply to all states and products, but each state tends to evolve its own laws for different products, so the rules need to reflect these quirks. The categories are many: actuarial, underwriting, even for ordering credit and motor vehicle reports from 3rd party bureaus.

The problem that I have from a design standpoint is that centralizing rules and processing is certainly nice and DRY, but there are costs:

  1. Additional network hops to access the centrally located rules service and return results;
  2. Additional complexity if the rules engine is exposed as a SOAP web service - consumers have to package up SOAP requests and OXM the response back to their own domain;
  3. Additional interfaces between the enterprise group that maintains the rules engine, the business that sets and maintains the rules, and the developers that consume them;
  4. Additional complexity - sometimes a data-driven solution might be enough.
  5. Additional dependencies - components who don't have control of their own rules have to worry about external dependencies on the rules engine for testing, deployment, releases, etc.

These problems crop up with lots of other Enterprise technologies (e.g., B2B gateways, ESBs, etc.)

The same Enterprise groups also tout SOA as a foundational principle. But my understanding of proper service design is that they should tile the business space an

Edit
Report

1 Answer

3

Your question is very Enterprise-specific, and I'm more into desktop stuff, so I hope this answer is not too general. I liked the concept of Don't Repeat Yourself, until I found out how it was being codified and ossified. I liked it because it agreed with me (duh!) and my own ideas about how to make code more maintainable and less error-prone. Basically, I see greater maintainability as requiring more of a learning curve on the part of the maintainer. I don't think there's an easy way around that. Here's an example of how to increase maintainability by a good factor, but not without a learning curve.

answered 2009-11-24T18:50:44.027

Your Answer