0

How fast is a Windows Workflow Foundation Activity? I know that is an unanswerable question, so let me give you some background:

The problem needs to be solved with some type of Business Rule Engine. At one time there could be as many as 300 rules to implement. Some related, some not related.

We have played with one inexpensive BRE (rulelab.net) which claims it can run over 1000 rules a second, and it seems to run pretty fast, though we have only had a handful of rules in it.

I watched and played with the Working with data in workflows and with only one if statement it seems to run pretty slow.

All in all, I am not all that happy with the performance of Microsoft WF, am I better off with using a traditional BRE? Any thoughts?

Sam Carleton
  • 1,339
  • 7
  • 23
  • 45

3 Answers3

5

Windows Workflow Foundation is fast enough for many applications. In a test of a simple noop activity it did more than 350K ops per second. Of course, your application will run actual business logic which will take longer but it is clearly worth an evaluation.

For more information see Windows Workflow Foundation 4 Performance

Ron Jacobs
  • 3,279
  • 2
  • 18
  • 16
3

Your example of "it can run over 1000 rules a second" is a bit strange. Normal business rules engine would say "number of fact objects per time interval" when it brags about its performance. This is because most of the time (and I've been in this industry for quite some time) a system receives a collection (a million or just one) of fact objects and needs to filter out those that don't pass through one or several rules. RETE-based engines will be slower for obvious reasons - that's why most of the time you don't need a RETE algorithm. But even with your example, the number is WAY too low for a solid BRE. Typically, you'd expect your engine to perform at least half a million rule evaluations per second, even if it doesn't cache rules and has to compile each rule on each iteration, provided that each rule doesn't execute anything externally and doesn't contain any expensive calculations. I don't know internals of rulelab.net but the speed that slow would mean that it doesn't compile its rules into native objects or it evaluates its rules in a very bad way.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Kizz
  • 779
  • 1
  • 10
  • 15
0

From your question, It is not clear why do you need a workflow/BRE at all. Workflow engines and Rule engines are designed to answer different set of issues/challenges. First thing first is to know your goal and what you are trying to achieve from business viewpoint. Why do you need a Workflow and/or Business Rule Engine? What is the challenge/need/requirement that you are trying to answer with Workflow and/or BRE? From your question, it is not clear at all.
I have a post to show you really why and when you chose one over another. Or sometimes you end up using both of them together. The point is that you are asking for a comparison of performance of two different things.

Arash Aghlara
  • 330
  • 3
  • 11