Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm interested in the ability of rules engines to:

  • launch and iterate over business driven logic
  • have "business users" perform the actual modification of those rules rather than developers
  • comprehend the business rules in general

Also, does using a rules engine impact the quality of an application?

Does the use of a rules engine change if you were deploying to a 1-machine setup vs. your architecture vs. a multi-tier cloud-based distributed architecture using thousands of machines? How would it be different?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

The decision as to whether to expose an interface for non-technical personnel to modify business rules largely depends on several factors, including the goals of the project, cost of the project, lifetime of the project, and the ratio of knowns to unknowns in the project.

For instance, if I believed that no one would use the rules interface, then I would probably opt out of implementing it. However, if I had reason to believe that changes would be frequent and that different end-users would expect different rules to be in place, then I would consider working on building such functionality.

I chose to do this on a project, and it took years before the feature was ever widely used. I suspected that we would eventually have end-users who would want to customize things themselves, so we implemented this functionality in pieces.

It started out as something that only certain people, like developers or admins could use. The interface was clunky, but usable if you knew what you were doing. But by the time the product was nearing completion, the rules engine backend logic came in handy, and our design team gave it a beautiful, customer-facing user interface.

If I were to do it different, I might choose a different database architecture just because the learning curve is high. But in short, building it early on led to many customer facing features later on without the headaches of having to go back in the code and refactor it to include all of the dynamic rules.

share|improve this answer
1  
I'd add that business users should expect to spend time to learn the rules interface. The interface will be easier for users to use, but it will definitely take time and effort to learn. They should not expect something magically understandable. –  9000 Feb 14 '11 at 21:11
    
@9000 - Very good point. I've seen this in my own projects. In fact, it oftentimes still involves training to bring the users up to speed, as well as a certain aspect of 'selling' the interface to the users and showing them the value it has to them. –  jmort253 Feb 15 '11 at 7:48

I wrote an application based on WF (windows workflow foundation). My boss (a DBA) was convinced that WF could perform multi-threading without the need to plan for concurrency. Memory was divided thoroughly, but there were so many problems I can't explain it in just a few paragraphs and it's only slightly related to your question...so I continue.

Ability to iterate BL:
WF does this well.
allow nontechies to "build an app":
WF does this well IF the architecture works AND nontechies understand technical limitations... Ours did not.
Ability to comprehend business rules in general:
There are some add-ins that can do some basic stuff much like sharepoint can automate workflows. I did not get into these items.
Quality of software realeases:
Mediocre. WF did not perform well for our purposes, but the system was badly designed and my hands were tied.
Speed of applications:
Slow. The learning curve is pretty steep for developers and end users alike. The way WF seperated memory (app-domains If I recall) made cross thread communication, mutexes and other threading concepts kludgy or simply not work whatsoever.

Ultimately, I wrote a prototype to prove WF fails in the way it was implemented. I replaced it with common multi-threading. Performance and code readability went up. Take this with a grain of salt as this was my first professional WF application.

Nontechs can come to believe practically anything is possible with no programmer required, a potentially large negative to the whole "dummy down" of BL; sociological problems related to this killed the project.

If I could go back and do it my way: use traditional threading and the BL molding achieved via Decorator Pattern. I wrote a proof of concept that used these technologies and it worked well. AND the BL mapping should be wrapped in a SIMPLE UI.
Update
I found an old post I wrote when working through concurrency problems. The code shows how printing "hello world" in parallel workflows doesn't work without an understanding of what goes on underneath the covers (which defeats the whole purpose of the WF abstraction). The MSDN moderator explains a high level overview of how parallel activities are really sequential. He concludes with basically "you need to read the whole manual" to do something this basic. http://social.msdn.microsoft.com/Forums/en/windowsworkflowfoundation/thread/8a1fa165-ad5c-4cd2-b489-7ea5fc31fed8

Good luck.

share|improve this answer
    
I have no experience with WF, but have always stayed away from it, because my gut instinct was to do that. But I can't help but wonder, if WinWF isn't just a retarded version of an ETL-system, such as Rhino ETL, in terms of what can be done with the same ease with it? –  Henrik Feb 20 '11 at 16:54

If I were to do this I would create a Domain Specific Language to express the rules, and maybe give the biz types a UI to modify it if requested. Then use a functional language (like Haskell, Lisp or Erlang) to evaluate the rules.

If massive parallelism was required I would go with Erlang which does concurrency very well. Using Erlang would scale well from 1 node to 100 or more.

If you think of the rules as an Algebra that will be applied to a dataset it becomes much easier to logic out what is need in your code, and to prove to yourself (or your managers) that it is correct. This is one of those places where a functional language will work in your favor.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.