2

I have a web service that I would like to load test by sending multiple requests to it in parallel. It occurred to me that WF might prove a useful tool to orchestrate that with the flexibility to quickly modify the load/flow and capture timing information in a visible and repeatable way (that's why WF is good, right?). From my reading to date, it appears that despite being called Parallel and ParallelFor, neither activity will run the enclosed activities in parallel but will run them serially on a single thread and wait for all enclosed activities to complete. If a parallel activity blocks it can then be persisted and execution will continue with the next parallel activity.

This SO question/answer suggests that if an AsyncCodeActivity is used (i.e. where I might call out to a web service), then

an AsyncCodeActivity always creates a no persist block for the duration of the activity’s execution. This prevents the workflow runtime from persisting the workflow instance in the middle of the asynchronous work, and also prevents the workflow instance from unloading while the asynchronous code is executing.

Which is clearly not what I want either. So how can I use WF to make multiple parallel requests to a webservice or is this a SPRH (square peg round hole)?

Community
  • 1
  • 1
David Clarke
  • 12,888
  • 9
  • 86
  • 116
  • See also http://stackoverflow.com/questions/221973/load-testing-wcf-service-hosted-on-iis - while I like WF4, there are existing tools specific to this task. – TrueWill Oct 05 '11 at 01:37
  • Thanks for the info, some interesting options - of course using a specific tool would give me little insight into WF4 ;-) – David Clarke Oct 05 '11 at 02:50

1 Answers1

0

I've found Ron Jacob's posts on WF4 and parallelism. It looks like the above information is only partially correct. Ron's sample project has some useful test cases including ParallelAsyncWorkflowApplication with comment Because WorkflowApplication is used the activities will run on random threads as assigned by the CLR thread pool.

David Clarke
  • 12,888
  • 9
  • 86
  • 116