开发者

Update a Silverlight application while clients are running it

I am new to Silverlight and web development and I was wondering if there was a way to update a Silverlight application while clients are running it. For example, suppose you can have many clients running the app. 24/7 and you want to do an update, how can you do it without losing compatibility with the clients currently running it? I know that if I stop, recompile and start the server, clients only have to do F5 and th开发者_高级运维ey will get the latest version, but that is not desirable if they are in the middle of processing something important.

Any idea how to achieve this?


This actually can work. You can dynamically load a xap file. Just structure your app in such a way that you can update and deploy parts of the application. You'll need to build an updater service that will watch for changes and prompt the user to update a specific component.

Check out this article on dynamic loading of xap.


I guess if you make sure that your WCF service has backwards compatibility (all calls from old clients are valid) its not a problem to have outdated clients accessing it. After all, once they download the XAP, they no longer rely on it not changing on the server, just like any standalone client on a remote machine.


What you need to remember is that although some parts are spaced out, the application is pretty much contained in a xap file. To edit that is to edit the entire project. So essentially you'd have a situation where you are editing the xap (that is currently on the user's system) and running it at the same time.

Even if you could manage it, you'd have to have a system to check and make sure the parts you are updating are not being used at the time while the program is running.

While I am no Silverlight expert, this situation seems like a Cluster F, which I pretty much doubt is possible at all.

Also when is the last time you saw any product that updated while it was working? Or if it does, never had to restart?


Having developed several Silverlight applications I can tell you that this is not something that you would want to do. You have to remember that Silverlight applications are downloaded to the client machine and then run from there. In theory, if you push an update which only impacts the client side, then all existing users should still be able to continue using the old version of the application until they refresh their browser. This way users will be forced to refresh to get changes but they won't lose current functionality.

However, if you made changes to the web services which silverlight calls and pushed those changes, then it's entirely possible that the current user's version of the application will no longer be able to access those services and therefore crash or keep throwing errors.

Just to add something - If you're planning an update which will impact the users, it's better to do the update in batches and warn users of a possible down-time. (If possible)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜