Skip to content

Think about how to integrate the electron-builder delta update mechansim #73

Open
@probonopd

Description

@probonopd

Looks like the electron-builder delta update mechansim is downloading binary deltas automatically in the background, and replaces the running application with the new version:

$ ls Downloads/
Bitwarden-0.0.15-x86_64.AppImage

$ Downloads/Bitwarden-0.0.15-x86_64.AppImage 
6211
[16:34:04.315] [info] Checking for update
[16:34:04.501] [info] Generated new staging user ID: 64f28813-9306-500e-a48d-9876811ca83b
[16:34:06.360] [info] Found version 0.0.16 (url: Bitwarden-0.0.16-x86_64.AppImage)
[16:34:06.362] [info] Downloading update from Bitwarden-0.0.16-x86_64.AppImage
[16:34:07.020] [info] File has 158 changed blocks
[16:34:07.020] [debug] [
  {
    "kind": 0,
    "start": 0,
    "end": 82292
  },
  {
    "kind": 1,
    "start": 82292,
    "end": 115060
  },
  {
    "kind": 0,
    "start": 115060,
    "end": 50854106
  },
  {
    "kind": 1,
    "start": 50854106,
    "end": 54138640
  },
  {
    "kind": 0,
    "start": 54138912,
    "end": 54749978
  },
  {
    "kind": 1,
    "start": 54749706,
    "end": 54793666
  },
  {
    "kind": 0,
    "start": 54793939,
    "end": 54905680
  },
  {
    "kind": 1,
    "start": 54905407,
    "end": 54924984
  }
]
[16:34:07.023] [info] Full: 53,694.4 KB, To download: 3,301.6 KB (6%)
[16:34:07.029] [info] Differential download: https://github.com/bitwarden/desktop/releases/download/v0.0.16/Bitwarden-0.0.16-x86_64.AppImage
[16:34:07.036] [debug] effective url: , range: bytes=82292-115059
[16:34:07.204] [info] Redirect to https://github-production-release-asset-2e65be.s3.amazonaws.com/76930145/b07d73c4-1a13-11e8-8d82-58a2153a36f7
[16:34:07.917] [debug] effective url: https://github-production-release-asset-2e65be.s3.amazonaws.com/76930145/b07d73c4-1a13-11e8-8d82-58a2153a36f7, range: bytes=50854106-54138639
[16:34:09.634] [debug] effective url: https://github-production-release-asset-2e65be.s3.amazonaws.com/76930145/b07d73c4-1a13-11e8-8d82-58a2153a36f7, range: bytes=54749706-54793665
[16:34:09.868] [debug] effective url: https://github-production-release-asset-2e65be.s3.amazonaws.com/76930145/b07d73c4-1a13-11e8-8d82-58a2153a36f7, range: bytes=54905407-54924983
[16:34:10.016] [info] New version 0.0.16 has been downloaded to /tmp/up-y1XSAk/Bitwarden-0.0.16-x86_64.AppImage
[16:34:25.136] [info] Auto install update on quit
[16:34:25.137] [info] Install: isSilent: true, isRunAfter: false

$ ls Downloads/
Bitwarden-0.0.16-x86_64.AppImage 

Questions:

  • Can the automatic updates be prevented, e.g., when running on a machine with limited/expensive network connectivity? (In my opinion, it is bad taste to blindly use the user's Internet connection without the user initiating anything)
  • What mechanism is used?
  • Is there an implementation for C/C++ available?
  • Is this more/less efficient than zsync?
  • Should we integrate this mechanism into AppImageUpdate, so that such application can also be updated through e.g., software centers?
  • ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions