Re: Update mechanism for standalone app/ Delta Updates

<[email protected]> Fri, 24 Feb 2017 13:33:43 +0000
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <E1FE65505B872347A5DE1BB83A95331E65BC9CD5@C111QVFHMBX74.ERF.thomson.com>
Jan,
                What I thought you would do was create a patch relative to the preceding version with xdelta3, then apply that patch to a copy of the preceding version and then do a checksum on the results. This way it’s like a different kind of archive, and everything else would remain the same.

Phil

From: Jan Viehweger [mailto:[email protected]]
Sent: Wednesday, February 22, 2017 11:44 AM
To: The Zero Install system
Subject: Re: [Zero-install-devel] Update mechanism for standalone app/ Delta Updates


Hi Phil,

thanks for your reply. I'm not sure how xdelta can help me with my problem.
It's not about how to create the patches (which i think xdelta is made for).
It's rather a problem of how to apply a patch as a new implentation on the base of an existing implementation. To my knowledge each implementation resides untouched in a unique folder. Modifying an existing implementation by patching it would break the checksums.

Best regards,

Jan

Am 22.02.17 um 14:54 schrieb [email protected]<mailto:[email protected]>:
Hi Bastian & Jan,
Have you considered using Xdelta3?
http://xdelta.org/<https://urldefense.proofpoint.com/v2/url?u=http-3A__xdelta.org_&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=4Pr_PrAPzkvj5hwDAYMdDu8rWJVZyxE05zU9XgLghe8&m=JH2q5iXZJg4OV7rJZj7QNsIOzSKTesloO4zA54Fn4PA&s=Vt8mfLnyTafnJmEK5uJGjRI17cpGKL86p2Gii-lES9A&e=>

Phil

From: Bastian Eicher [mailto:[email protected]]
Sent: Wednesday, February 22, 2017 3:36 AM
To: 'The Zero Install system'
Subject: Re: [Zero-install-devel] Update mechanism for standalone app/ Delta Updates

Hi Jan,

you are right, applications built on cross-platform environments like Webkit or Java are great candidates for Zero Install. Perhaps you can help spread the word. :)

The easiest way to get smaller updates with Zero Install right now is to split your applications into multiple smaller components that can be updated independently. However, this would require your application to find the different “parts” of itself using environment variables. For example your main feed might reference a MyApp-Videos.xml feed like this:
<requires interface=".../MyApp-Videos.xml">
  <environment name="MYAPP_VIDEOS" insert="."/>
</requires>
Your app would then need to look in $MYAPP_VIDEOS instead of ./app/media/videos. I have no experience with Node Webkit so I do not know whether this would be easy to accomplish.

Zero Install also has the concept of “recipes” that allow implementations to combine multiple archives or other steps like renames or removals. For example:
<implementation version="1" id="sha256=abc">
  <archive href=".../myapp-v1.zip"/>
</implementation>
<implementation version="2" id="sha256=xyz">
  <recipe>
    <archive href=".../myapp-v1.zip"/>
    <archive href=".../myapp-v2-delta.zip"/>
  </recipe>
</implementation>
However, this would only save you from having to upload large updates. When downloading v2 Zero Install would still need to re-download v1 as well because it does not know that the existing sha256=abc implementation corresponds to the myapp-v1.zip archive recipe step.

@Thomas: Perhaps we could introduce a new recipe step to handle this, for example:
<recipe>
  <implementation id="sha256=abc"/>
  <archive href=".../myapp-v2-delta.zip"/>
</recipe>
What do you think?

Regards
Bastian

From: Jan Viehweger [mailto:[email protected]]
Sent: Montag, 20. Februar 2017 11:52
To: The Zero Install system <[email protected]<mailto:[email protected]>>
Subject: [Zero-install-devel] Update mechanism for standalone app/ Delta Updates


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<https://urldefense.proofpoint.com/v2/url?u=http-3A__nwjs.io&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=4Pr_PrAPzkvj5hwDAYMdDu8rWJVZyxE05zU9XgLghe8&m=TRME5ScYevAR6VJ0DUe0ID__h2Kruvb-3dvFlkACwJU&s=_IEeBk2ic5F9mC8zWuPwKPuGfJfKzcP8A72xqgZTLxc&e=>). 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/<https://urldefense.proofpoint.com/v2/url?u=https-3A__git-2Dlfs.github.com_&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=4Pr_PrAPzkvj5hwDAYMdDu8rWJVZyxE05zU9XgLghe8&m=TRME5ScYevAR6VJ0DUe0ID__h2Kruvb-3dvFlkACwJU&s=0SIgG0mygYgcyw1-z_eKbBoorERgzu1Co86VAnYB5lA&e=>) 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)

     *   nwjs.exe
     *   ...

  *   app (DIR)

     *   js (DIR)

        *   main.js
        *   ...

     *   templates

        *   view1.html
        *   view2.html

     *   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<https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=4Pr_PrAPzkvj5hwDAYMdDu8rWJVZyxE05zU9XgLghe8&m=JH2q5iXZJg4OV7rJZj7QNsIOzSKTesloO4zA54Fn4PA&s=YklnwYJVi5bNuGGPikflu40Fo6gcucr72TUbS4d-tXQ&e=>




_______________________________________________

Zero-install-devel mailing list

[email protected]<mailto:[email protected]>

https://lists.sourceforge.net/lists/listinfo/zero-install-devel<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_zero-2Dinstall-2Ddevel&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=4Pr_PrAPzkvj5hwDAYMdDu8rWJVZyxE05zU9XgLghe8&m=JH2q5iXZJg4OV7rJZj7QNsIOzSKTesloO4zA54Fn4PA&s=0ml_HKkix16ABHIO-OBSzhiPFvWNEdQ5gwr2wg5gYhI&e=>

------------------------------------------------------------------------------
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