views:

131

answers:

1

One of my hobby applications uses a SQLite back end to store the application data. The application is setup so that the user can click the typical "Check for Updates" button, which will query a webservice to see if an update is available. If it is, the user clicks the "update" button and downloads a the new database (via HTTP) which then gets installed in the application. This process is currently "modal" in that the user cannot do anything else in the application until the download and install are complete.

I'm working on updating the application, and one thing I want to make happen is to have this update process occur behind the scenes, ala Windows Update. When the application fires up, the service would be queried, and if an update is available, it would automatically be downloaded, but in the background so the user could continue to do their work. Once the download is complete, the user would be prompted to install the update.

I've looked extensively into BITS, and even though there are no APIs I've seen to date to leverage the technology, I have seen some sample code and believe I can make it work.

But is this the best away to approach a "background update" for a data library, or are there some other solutions/approaches out there?

+3  A: 

If you are only running on MS Windows, and your clients are using a new enough version of the operating system to support BITS, then I think certainly you should leverage the functionality already built into the platform, rather than doing what everyone else does and write your own background update checker that sits in my taskbar notification area and uses system resources unnecessarily.

As for information about BITS:

About BITS

BITS Reference

Background Intelligent Transfer Service, From Wikipedia

Grant Wagner