Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThanks for the feedback, that's what I was thinking of doing, I was hoping that there would be a reference someone would be able to point me to. In terms of the approach I need to take then yes you are right - it's basically calling a few different services in parallel (e.g. do a vehicle lookup, do a postcode lookup) in different locations. When you say book-keeping, does that mean you have concerns about the approach in general?
      singulars
    2. CONo concerns, it should work; just that you have to be careful implementing it as it's easy to screw up :). What I meant with book keeping is that you've got to keep track of the state of each call and make sure you handle errors, etc from each one, which usually means, among others, deciding what you want to do if one out of the N service calls fails (i.e. do you return an error or a partial response, etc). Implementing IAsyncResult isn't actually too hard, there's a sample one here: http://blogs.msdn.com/b/ploeh/archive/2007/02/09/agenericiasyncresultimplementation.aspx
      singulars
    3. COAh ok. I agree it doesn't look too bad, but as you say easy to screw up :) Do you think this pattern would also be appropriate if we had to call several long running procedures on a database (e.g. 2 secs each)? The reason for that is that some of our legacy functionality has lots of business logic in the database so it takes a while to execute there, and it seems a waste of web server resources to run them synchronously (can be upto 6 calls). Obviously this adds more complexity to the code, but it seems that it would be worth it to improve the scalability of the web servers.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload