0
votes

I have a silverlight application that will be used by >1000 users. Every fortnight the XAPs would be upgraded. The next day morning all access the page and for each user a copy of the silverlight XAP (application) is downloaded to the local machine via the browser. Since the number of users are more , there is possiblity of more network traffic. I want to stream line this by making sure the request to the download the XAP is queue and every 100 requestes are processed at a time. Let me know the possibilities.

Thanks

2

2 Answers

0
votes

I am assuming this is an Out-of-Browser Silverlight app? In this case, it must be calling Application.CheckAndDownloadUpdateAsync. Instead of doing this during application start-up, set up a DispatcherTimer that fires at some random time (eg, 0-60 minutes later) to do the check.

Find whereever CheckAndDownloadUpdateAsync is called and replace it with:

        var timer = new DispatcherTimer();
        timer.Interval = TimeSpan.FromMinutes(new Random().Next(60));
        timer.Tick += (sender, args) =>
        {
            Application.Current.CheckAndDownloadUpdateAsync();
            timer.Stop();
        };
        timer.Start();

(I've omitted wiring Application.Current.CheckAndDownloadUpdateCompleted, but this must be done before the timer is started.)

0
votes

Sorry, I see that the silverlight app is in-browser. In which case, this has nothing to do with Silverlight and is simply about web servers, HTML, and HTTP. Try reframing the question and adding relevant tags.

I think your strategy would be to fool around with cache control directives, leaving some clients with stale copies while others get new ones. Don't know how to do this (perhaps javascript can, or maybe you need to tweak the web server), but it wouldn't matter if the resource is a xap or a jpg or whatever.