c# - Best design for long process in Web Service -


i have design question on how best approach process within existing dotnet2 web service have inherited.

at high level process @ moment follows

client

  1. user starts new request via web service call client/server app
  2. request , tasks created , saved database.
  3. new thread created begins processing request
  4. request id returned client (client polls using id).

thread

  1. loads request detail , multiple tasks
  2. for each task requests xml via service (approx 2 sec wait)
  3. passes xml service processing (approx 3 sec wait)
  4. repeat until tasks complete
  5. marks request completed (client know finished)

overall takes approximately 30 seconds request of 6 tasks. each task being performed sequentially inefficient.

would better break out each task again on separate thread , when complete mark request completed?

my reservation duplicating number of threads factor of 6-10 (number of tasks) , concerned on how impact on iis. estimate cut normal 30 second call down around 5 seconds if had each task processing concurrently under load design suffer?

the current design operating , users have no problem time taken process prefer work faster if possible.

is bad design , if there better approach? limited current dotnet version @ present.

thanks

if worried iis performance want keep jobs outside of iis, imo consider queueing tasks , creating separate service work. approach more scaleable in add or remove front end iis servers or task processors address varying load. large-scale system perform processing off of front end server.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -