locked
RIA Services Sequential Calls RRS feed

  • Question

  • Hi everyone,

    I have a set of RIA services calls that I want to call sequentially. I do not know how many calls this will be as this will be determined by the user actions.

    Let's I have a set of buttons ( say 100). The user could click on any button, in any sequence, at any time. Each button click will generate a RIA services call.

    For reasons of performance, I can't generate what could be several dozen RIA services calls at the same time. Instead, I want to queue the calls up so that they execute one by one.

    Can anyone point me in the direction of something that could perform this task?

    Jason

    Monday, November 26, 2012 12:26 AM

Answers

  • Hi,

    Call from the Silverlight Client is asynchronous. So If you need to cascade the calls like sequential fashion then do the following -

    Option 1. Write a completed handler for 1st AsynCall. On successful completion of the same make a 2nd call once again providing the completed handler. Do the same subsequently.

    Option 2. Make the sequential call stack at the RIA Service end and Invode this method from the Silverlight Client.


    Dhananjay Tech Lead

    • Marked as answer by iwpfModerator Tuesday, December 4, 2012 6:19 AM
    Wednesday, November 28, 2012 9:09 AM

All replies

  • I think the best aproach is to make your own TaskScheduler with a maximum concurrency level of 1. You can create a task for each RIA call using a TaskFactory bound to your TaskScheduler.

    An example of a Task Scheduler with limited concurrency level can be found here


    Monday, November 26, 2012 9:25 PM
  • Hi,

    Call from the Silverlight Client is asynchronous. So If you need to cascade the calls like sequential fashion then do the following -

    Option 1. Write a completed handler for 1st AsynCall. On successful completion of the same make a 2nd call once again providing the completed handler. Do the same subsequently.

    Option 2. Make the sequential call stack at the RIA Service end and Invode this method from the Silverlight Client.


    Dhananjay Tech Lead

    • Marked as answer by iwpfModerator Tuesday, December 4, 2012 6:19 AM
    Wednesday, November 28, 2012 9:09 AM