bemusic / bmson-spec

Technical specification for bmson format
http://bmson-spec.readthedocs.org/
21 stars 2 forks source link

Standardize package distribution on web (also applies to BMS) #6

Open dtinth opened 8 years ago

dtinth commented 8 years ago

Criteria:


Syndication

How to list available songs?

Another alternative would be to use an Atom feed or RSS feed, like Podcast. Either as an <enclosure> or <link rel="enclosure" or a new XML namespace.

Package Style

Both Bemuse and CircularRhythm are using custom file format to save assets.

An alternative would be to use ZIP files:

  1. Single ZIP file containing everything.
    • Have to redownload whole set on network error.
    • Have to redownload whole package when I want to add extra charts.
    • Have to download video when not needed.
  2. ZIP archive containing resources, while note files are outside.
    • Have to redownload whole set on network error.
    • Multiple files to send.
  3. A sequence of multiple ZIP files. Files in later archive overrides file in previous archive.
    • Multiple files to send.

Some problem with ZIP files:

zardoru commented 8 years ago

Is it possible or practical to use tar files, given the case you don't want the compression? It is already a standard way to package and it does not compress by default. I do prefer the 3rd option - a sequence that overrides files.

dtinth commented 8 years ago

@zardoru Oh. Tarballs! That’s a great idea. Unfortunately, it doesn’t officially accept non-ASCII file names. :(


@wosderge’s notes: https://docs.google.com/document/d/1ym2Niq3A2pUC9YSWkMAXnYrC3JQN92LSgpSFML4rOgc/edit


I also found this thing on W3 recommendation. What do you think? https://www.w3.org/TR/web-packaging/#streamable-package-format

zardoru commented 8 years ago

Sounds interesting - but given the example files, I doubt its fitness for raw binary data. I'd still argue in favour of zip files, it is very easy to find a library that is able to handle them (for native players and tools), compression can be disabled, and it is ubiquitous.

dtinth commented 8 years ago

Now we also have this in browser: https://stuk.github.io/jszip/

Two years ago I use another library, https://gildas-lormeau.github.io/zip.js/, to decompress zip files in browser (the prototype version of Bemuse). It turns out to work very slowly — and crashes my iPad.

dtinth commented 8 years ago

If we use ZIP files, maybe some extra tooling is needed: A verifier/fixer which verifies:

I think it should be possible to create such tool. Therefore, I also agree about using ZIP files.