What is the experience with Google 'Omaha' (their auto-update engine for Chrome)?

前端 未结 6 1625
攒了一身酷
攒了一身酷 2020-12-22 16:14

Google has open-sourced the auto update mechanism used in Google Chrome as Omaha.

It seems quite complicated and difficult to configure for anybody who isn\'t Google

6条回答
  •  庸人自扰
    2020-12-22 16:32

    Perhaps, you can leverage the courgette algorithm, which is the update mechanism that is used in Google Chrome. It is really easy to use and apply to your infrastructure. Currently, it just works for Windows operating systems. Windows users of Chrome receive updates in small chunks, unlike Mac and Linux users who still receive the chunks in total size.

    You can find the source code here in the Chromium SVN repository. It is a compression algorithm to apply small updates to Google Chrome instead of sending the whole distribution all the time. Rather than push the whole 10 MB to the user, you can push just the diff of the changes.

    More information on how Courgette works can be found here and the official blog post about it here.

    It works like this:

    server:
        hint = make_hint(original, update)
        guess = make_guess(original, hint)
        diff = bsdiff(concat(original, guess), update)
        transmit hint, diff
    
    client
        receive hint, diff
        guess = make_guess(original, hint)
        update = bspatch(concat(original, guess), diff)
    

    When you check out the source, you can compile it as an executable (right click compile in Visual Studio) and you can use the application in that form for testing:

    Usage:

      courgette -dis  
      courgette -asm  
      courgette -disadj   
      courgette -gen   
      courgette -apply   
    

    Or, you can include that within your application and do the updates from there. You can imitate the Omaha auto update environment by creating your own service that you periodically check and run Courgette.

提交回复
热议问题