long running web service

6 posts, 0 answers
  1. tomas
    tomas avatar
    139 posts
    Member since:
    Sep 2012

    Posted 11 Aug 2010 Link to this post

    Hello Telerik.

    I am running some sort of exporting procedure on the server which is started by web service. I can exactly say how many files have been already exported and how many left.

    How can I visualize the progress to the user in Silverlight application, please?

    Thanks Tom
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 12 Aug 2010 Link to this post

    Hello tomas,

    You can use the BusyIndicator if you don't want the users to be able to interact with the application while loading:

    http://demos.telerik.com/silverlight/#BusyIndicator/FirstLook

    or the ProgressBar's indeterminate mode (IsIndeterminate property) if you do:

    http://demos.telerik.com/silverlight/#ProgressBar/FirstLook

    Hopefully this is what you are looking for,

    Sincerely yours,
    Miroslav
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. tomas
    tomas avatar
    139 posts
    Member since:
    Sep 2012

    Posted 12 Aug 2010 Link to this post

    Thank you, but this is not what I am looking for.

    I would like to show something like

    2 of 50 documents converted (4 % finished)

    How can I achieve this?

    Thank you very much.

    tom
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 12 Aug 2010 Link to this post

    Hello tomas,

    The ProgressBar can be as part of the view, say:

    <telerik:RadProgressBar Minimum="0" Maximum="50" Value="2" />

    The text can be a simple TextBlock that you updated together with the value of the ProgressBar when needed.

    Sincerely yours,
    Miroslav
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. tomas
    tomas avatar
    139 posts
    Member since:
    Sep 2012

    Posted 12 Aug 2010 Link to this post

    Hello Miroslav.

    Yes, I know. But what I dont know is how to receive the status of finished, remains status from web service.

    I think I must use more then one tread on the client to update the UI.

    Do you have some common patter how to solve this?

    Thanks Tom
  7. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 16 Aug 2010 Link to this post

    Hi tomas,

    All web requests in Silverlight are asynchronous, so the UI thread should not normally be blocked by a service call unless you are explicitly joining a thread.

    Once you have established a session progress updates could happen in two ways:

    - Polling - by constantly invoking a web method that returns the progress
    - Push - by using a duplex service that will notify the Silverlight client once there is an update.

    This talk has more information:

    http://blogs.msdn.com/b/silverlightws/archive/2010/04/04/mix-2010-talk-what-s-new-in-wcf-in-silverlight-4.aspx

    and a sample project:

    http://blogs.msdn.com/b/silverlightws/archive/2009/09/30/having-a-pollingduplex-service-and-any-other-wcf-service-in-the-same-website-causes-silverlight-calls-to-be-slow.aspx

    Please note that using a duplex service is essentially client -> server polling under the hood  and it may not scale very well.

    Kind regards,
    Miroslav
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner