Update mechanism for standalone app/ Delta Updates

Jan Viehweger <[email protected]> Mon, 20 Feb 2017 11:51:54 +0100
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <[email protected]>
Hello list,

i'm developing a cross plattform standalone app which need's an 
(auto/self-) update mechanism. The app is written in HTML5 & node.js and 
runs on Node Webkit (http://nwjs.io). The problem is: Node Webkit does 
not provide an update feature.

So i met zero install ;) . The concept behind blow my mind away and i'm 
wondering why it's still quite unknown (in my scope)?

I'm evaluating if ZI can solve my update problem 100%. So let me explain 
in detail.

One major requirement of the update routine is, that updates shout be as 
small as possible. For that purpose other tools use so called delta 
updates. I've already read delta updates are a upcomming feature for ZI 
so i asked myself if i could use a workaround:

The app itself consists of a small amount of javascript but a large (and 
growing) number of mediafiles (images and videos). Updates will most of 
the time consist of changed or new mediafiles. so creating patches 
(delta updtes) for images or videos (where almost every pixel changes) 
make no sense at all.

So my idea is the following pragmatic idea:

  * The deployed app will be versioned in a LFS
    (https://git-lfs.github.com/) enabled GIT repo.
  * Each change to the repo will be flaged as a new Version.
  * The Diff between the last version and the current will be exported
    as a zip containing only the modified and new files
  * Transfered to ZI the idea is, that each version represents an
    seperate feed/interface which depends on the previous versions which
    by itself is an feed/interface too
  * By this a tree of dependencies from one to the higher version will
    be resoved.

The big question now is, how to merge the files (each extracted archive) 
together in one place and override older files with newer ones?

For making it more descriptive, the following filestructure makes the 
whole standalone app

  * nwjs (DIR)
      o nwjs.exe
      o ...
  * app (DIR)
      o js (DIR)
          + main.js
          + ...
      o templates
          + view1.html
          + view2.html
      o media (DIR)
          + videos (DIR)
              # movie1.mp4
              # movie2.mp4
              # ...
          + images
              # image1.jpg
              # image2.jpg
              # ...

The "nwjs" folder represents the Node Webkit runtime which itself won't 
be touched. Normaly you just download it.

The "app" folder contains the app to be run in Node Webkit. The app will 
be started by calling the nwjs.exe withe the "app" directory as the 
argument.

The app interface/feed will be run by the Node Webkit interface.

--------

Any suggestions are welcome

Best regards
Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
Zero-install-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zero-install-devel