1 / 14

Using BITS for updates

Using BITS for updates. Quick training session. Goal / Purpose. Download and install takes a long time End user just wants to work ! We want smooth updates …. Goal / Purpose. Download and install takes a long time End user just wants to work ! We want smooth updates …. Solution.

johnna
Télécharger la présentation

Using BITS for updates

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using BITS for updates Quick training session

  2. Goal / Purpose • Download and install takes a long time • End user just wants to work! • We want smooth updates …

  3. Goal / Purpose • Download and install takes a long time • End user just wants to work! • We want smooth updates … Solution • Background downloads • Scheduled install

  4. What is BITS? • Background Intelligent Transfer Service • Windows component • Foundation for Windows Update • Available from 2001 (XP and W2000) • Version 1.5 • Version 4.0

  5. How does it work? • Create a “job”, like download this file • Periodically check the status • When finished, save (copy) the file

  6. BITS Advantages • Works everywhere • Asynchronous • Downloads even if CET is turned off • Uses idle network bandwidth

  7. BITS Cons • Very slow response time (10-300 ms) • Very sensitive to workload (jobs*files) • No support for directory listings (!) • No peer caching (in version < 4) • One file at a time feeling • Windows Update might interfere … • Narrow bandwidth – unknown …

  8. Dealing with the cons • Job queue (limit to 5 jobs) • Webdirectory.exe • Defensive polling (only when idle)

  9. What can YOU do with BITS? • Marbodal uses BITS for pricelist updates • BITS can also do uploads (like issue reports) • Easy to sync all files in a directory (*.db) • OO – you can subclass and customize • But – it’s still not mature … • So there will be stuff missing …

  10. Single file example // Setup a handler UpdateHandler handler = createUpdateHandler("cet-test-bits", "CET Test Handler"); handler.updateInterval = 3 minutes; handler.jobInterval = 30 s; handler.idleThreshold = 5 s; // Setup an update group strremoteDir = configuraWebRoot # relativeDir; UrllocalDir = cmWritable("data/"); RtBitsTestGroupgroup("cet-test-bits-group", "Test Group", remoteDir, localDir, waitForAll=true); handler << group; // Setup a single file to keep updated RtBitsTestUpdateupdate(fileToDownload); group << update; // Start the timers handler.startTimers();

  11. Directory example • // Setup a handler • UpdateHandler handler = createUpdateHandler("cet-test-bits", "CET Test Handler"); • handler.updateInterval = 3 minutes; • handler.jobInterval = 30 s; • handler.idleThreshold = 5 s; • // Setup an update group • strremoteDir = configuraWebRoot # relativeDir; • UrllocalDir = cmWritable("data/"); • UpdateDirectoryGroupsyncMyStuff("my-pricelists-sync", "Sync the pricelists directory", • remoteDir, localDir, waitForAll=true); • // Start the timers • handler.startTimers();

  12. Extension updates • Example of an advanced implementation • Header (info) files • Version numbers embedded • File dependencies & consistency • Only update Extensions the user has installed • Or Extensions selected manually by user

  13. Extension updates example • Webdirectory.exe downloads dirlist (async) • New info files downloaded • Info files versions compared to installed • Download new Extensions • Notify user about new updates • And allow scheduled install

  14. Errors • Files inconsistent (being uploaded) • Online file removed during download • Online file replaced during download

More Related