W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: Multipart or TAR archive/package support for all APIs (Performance and scalability)

From: Sebastian Markbåge <sebastian@calyptus.eu>
Date: Wed, 5 Aug 2009 12:33:39 +0200
Message-ID: <491930550908050333r3ec5f08al8a78ded1c10b33e@mail.gmail.com>
To: Gregg Tavares <gman@google.com>, public-webapps@w3.org
> HTTP Pipelining What specification changes do you propose? Something
> normative, or just more explanatory stuff?

Actually I don't have a specific proposal for HTTP pipelining because I
think that it's going to be more difficult to implement since it would
involve changes to the HTTP protocol and updates to lots of servers and
proxies. I think it would be easier to address this issue on a higher level

#1) I'm making a version of any medium to heavy flash app but using only
> HTML5 standards audio, video, canvas.  I need lots of assets. I want to
> start my app immediately, put up a loading progress bar while I download the
> assets.

Progress bars is truly something that would be quite useful. But I'd suggest
that needs an API that addresses the issue at a lower level by counting
individual bytes downloaded (out of a total if Content-Length is available)
rather than number of files. That would provide a smoother progress and more
accurate calculations for things like time remaining etc.

> #2) I'm making a game where I want to download user content. The user makes
> a character using some editor, online or offline, the character is put in an
> archive with the user's images and other data.

My proposal is missing a querying mechanism. But I don't think that you need

Most packaged plugin systems uses some kind of manifest file included in the
package. To fetch the data of a plugin you would use xhr.open('GET',
'plugin.tar#manifest.xml', true); from that file you can extract
the filenames to the various images and miscellaneous data. You'll probably
want to load the images in some defined context and not just query all

> #3) I'm making WorldOfSpaceCraft in WebGL. Knowing that I need to download
> LOTS of assets I make an archive file with low-poly lods and low-res
> textures at the front of the archive and progressively more detailed ones
> toward the end. As the archive is downloaded I need access to the files as
> they become available without having to wait for the entire archive to
> download.

The idea is that the UA should trigger the load or statechange events when
the particular referenced file is reached, not at the end of the archive. So
a streamable archive format is preferred.

var low = new Image();
low.src = 'archive#lowres.jpg';
low.onload = fn;

var mid = new Image();
mid.src = 'archive#midres.jpg';
mid.onload = fn;

var high = new Image();
high.src = 'archive#highres.jpg';
high.onload = fn;

If the files appears in order in the archive, they will trigger in that
order as the archive is downloaded. So low.onload will trigger as soon as
#lowres.jpg is found which may be long before #highres.jpg.
Received on Wednesday, 5 August 2009 10:34:20 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC