There are some interesting new ideas for what a programming language can offer 
to standardize, simplify, and secure the packaging of external dependency 
files, but I think embedding zip files in the executable is the wrong way to do 
this...

I encourage everyone to read up on [IPFS](https://ipfs.io) 
[[wp]](https://en.wikipedia.org/wiki/InterPlanetary_File_System); and to 
address this VFS matter (and other matters) from the perspective of building 
more fault-tolerant and delay-tolerant ("inter-planetary") network apps with as 
little centralization as possible.

  * ZIP and other **general file compression is nearly useless for improving 
download performance**, because the vast majority of the data being transferred 
these days is multimedia that is already in its ideal compression format. There 
are also specialized compression formats for collections of textfiles (based on 
[PPM](https://en.m.wikipedia.org/wiki/Prediction_by_partial_matching)) and 
structured data formats - I hope Nim will encourage their use.
  * With modern protocols like HTTP**/2**, BitTorrent, and especially IPFS (of 
which I am a huge fan), there's almost **no downside to downloading a list of 
separate files rather than one zip, and there are many advantages**. One 
advantage is that you can prioritize which files should be downloaded first, so 
the user may begin using your app while the rest of it downloads, with specific 
pieces given priority or skipped based on user choices. And sometimes you way 
want to download different files (ex. video resolutions) based on what the app 
detects as it runs.
  * **Cacheability the key to good performance.** The fastest-loaded data is 
the data that you already have locally (or on your LAN, or on your ISP, or as 
few hops / [light-(milli)seconds](https://en.wikipedia.org/wiki/Light-second) 
away as possible). If you are bundling an app and all its dependencies into one 
file, there's no way to tell if you already have some of those dependencies 
cached. With IPFS, when X people on the same WiFi hotspot (or even in all of 
New Zealand, depending on their latency) download your app, it will only 
download from your server once, and the rest will download from each-other. And 
when you release a code bugfix to your app / game, there's no reason for 
unchanged media components to be re-downloaded again.
  * **Cachability of public BLOBs also improves reliability and privacy.** 
Storage is cheap (and it's getting cheaper faster than just about any other 
hardware category), so we will soon see more and more caching 
[NAS](https://en.wikipedia.org/wiki/Network-attached_storage) servers, and 
perhaps even automated preemptive caching. If you have terabytes of empty NAS 
space to burn (especially if you're an ISP or admin at a large network), why 
ever throw away any public IPFS file that someone on your network has 
downloaded, in case someone else ever wants it again. This means no upstream 
IPS, government, network failure, DoS, etc can censor this data, or even know 
if it was requested by a specific user or a preemptive caching AI.
  * **Identifying files by checksum instead of URL improves security.**


Reply via email to