ember-fastboot / fastboot-s3-downloader

A FastBoot App Server downloader for AWS S3
7 stars 24 forks source link

Downloader workflow #1

Closed bcardarella closed 5 years ago

bcardarella commented 8 years ago

Currently the downloader will download the archive and extract to the designated directory. However, in the event that the archive is malformed or something else goes wrong you could end up in a state where the archive is not extracted and the designated directory is empty.

This is not ideal for us. We're using nginx to proxy to the fastboot app server. When that server is not available we'd like to fallback to the static index.html and corresponding assets.

Currently the downloader will take the archive file structure:

foobar-1234567890abcdef.zip <filename>-<sha>.<ext>

The filename is used as the extraction directory. Instead I propose extracting to <filename>-<sha> or simply <sha>. Then doing a symbolic link to that directory for the appserver to read from. The symlink will occur only after everything else is a success. So in the event of failure along the way the symlink still points to the fallback and the app can still render.