views:

347

answers:

3

Google have open-sourced the auto update mechanism used in Google Chrome:

http://code.google.com/p/omaha/

It seems quite complicated and difficult to configure for anybody who isn't Google. Has anybody used Omaha in a their project? If so, would you recommend it?

A: 

An auto-update mechanism is something I'd personally code myself, and always have in the past. Unless you have a multi-gigabyte application and want to upload bits and pieces only, just rely on your own code/installer. That said, I've not looked at Google's open source library at all.. and didn't even know it existed. I can't imagine it offering anything superior to what you could code yourself, and with your own code you aren't bound by any licensing restrictions.

Jeremy Collake
Personally, I find third-party auto-update frameworks a big plus. At least in the Mac dev world, [Sparkle](http://sparkle.andymatuschak.org/) is a frequently-used option; clearly plenty of devs are opting for prefab.
Matt Ball
Correct me if I'm wrong but since I've installed Chrome I've never needed to "update", it's all transparent in the background and does so without me needing to do anything. IIRC when this first came out they spoke of being able to just update the actual binary distribution via some process akin to binary diffs etc. which makes this very cool and much different than coding your own where you just prompt the user to download and re-install the new version
dstarh
A: 

In .NET world you might want to take a look at Click-Once deployment.

Jakub Konecki
+2  A: 

Hi Mark,

Perhaps, you can leverage courgette, which is the update mechanism that Google Chrome. It is really easy to use and easy to apply to your infrastructure. Currently, it just works for Windows operating systems. Window 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 10MB 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 VS) and you can use the app in that form for testing:

Usage:

  courgette -dis <executable_file> <binary_assembly_file>
  courgette -asm <binary_assembly_file> <executable_file>
  courgette -disadj <executable_file> <reference> <binary_assembly_file>
  courgette -gen <v1> <v2> <patch>
  courgette -apply <v1> <patch> <v2>

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

Mohamed Mansour
Hi Mohamed - thanks - that sounds like a good way to reduce the size of the updates. However, it seems Courgette still needs an 'update framework' (whether Omama or a DIY framework).
Mark

related questions