Hosting Web Media Blocks as Torrents
Beginning with InstallAware version web media blocks as torrents using the following procedure:
, you may host your- Ensure the Download Torrent plug-in is installed.
- If it is not already installed, run InstallAware setup again, and choose to install all optional features in its maintenance mode, or add this plug-in manually.
- Register the Download Torrent plug-in as a download handler for your web media blocks using the Use Download Engine command.
- Ensure to do this before any web media blocks have been defined in your script, such as at the very top of your setup script.
- Build your setup normally using the Web layout, as other layouts are not applicable for optional runtime downloads at all.
- As part of your build process, your setup will automatically be injected with the torrent files for all web media blocks which have been generated. Without these torrent files, your 7zip torrents cannot be located on the network.
- Please note that you will not be needing to specify any valid download URLs in web media block commands. The Download Torrent plug-in will refer to its internal list of torrent files and identify the correct downloads at runtime. However, in order to allow the web media block commands to compile, you will still need to specify a non-emptly list of URLs.
- Similarly, multiple URLs are redundant as well with torrent downloads.
- If you have skipped building some web media blocks, setup will be using the torrent files generated as part of the last build process wherein the web media blocks skipped in this iteration had been previously generated.
- These torrent files are cached in the web media blocks at all. subfolder of your project folder. Please ensure you do not delete this folder, if you are planning to reuse any
-
Seed these web media blocks normally using any torrent client application for as long as you will be distributing this setup.
- Your end-users will also be contributing to the seeding process for as long as they are installing your setup, as the torrent download process involves an automatic upload too.
Please also review the important considerations at the bottom of this topic regarding advanced hosting settings.
Managing Torrent Download Settings
There are several configurable settings for the Download Torrent plug-in when it is being registered as a download handler using the Use Download Engine command. To access these settings, simply visually edit the field in the Use Download Engine command.
Manage Firewall exception
Check this box to allow the command to automatically adjust the administrator privileges and full elevation for any attempted changes to succeed.
to permit maximum speed downloads and uploads. The command will revert any changes it has made upon the completion or cancellation of its task. Please note that setup must be running withDownload limit (Kb/s)
To limit the download rate of your file, enter the maximum download speed in this field, specified as kilobytes per second.
Enter 0 to download without any speed limit.
Upload limit (Kb/s)
The file being downloaded will be automatically uploaded while the download is still in progress. To limit the upload rate of your file, enter the maximum upload speed in this field, specified as kilobytes per second.
Enter 0 to upload without any speed limit.
Please note that not limiting the upload rate may saturate bandwidth, often more so than an uncapped download would.
Trackers URL
We strongly recommend that your torrents be announced on trackers, which helps exponentially accelerate downloads found on peer to peer networks.
You may add your custom list of trackers to this field, and/or use the recommended list of trackers. The recommended trackers are active as of the software launch date, but are subject to change.
The default list of trackers is stored inside the file Use Download Engine command, your changes will be saved inside a file named inside the same folder.
found inside the plug-in folder (typically ). Any time you edit this list in theWithout any trackers, your
torrents may download exponentially slower.Seeding Torrents
After building your setup, please follow the steps below to seed your web media blocks built as archives:
- Copy all your built archives, and their corresponding torrent files (cached inside the subfolder of your project folder), to a seeding folder, such as .
- Install the latest version of https://www.qbittorrent.org and open it. from
- From , choose .
- In the dialog, browse to your seeding folder, such as , and select the first torrent file to seed.
- In the dialog, ensure that the box is checked.
- Repeat the steps 3-5 above for each additional web media block built by your setup. archive, each of which corresponds to a particular
- Leave running for as long as you want to maintain your published setup version.
Seeding Rebuit Web Media Blocks
Typically when rebuilding a setup, you may or may not re-upload rebuilt web media blocks to a web server. You would probably base your decision on whether the actual binary payloads contained inside the 7zip files have changed or not.
Moreover, even when 7zip files are refreshed on a server, legacy installers referencing those same 7zip files through common download URLs may still successfully download the updated web media blocks, and successfully install updated files - without any changes necessary to the legacy installers themselves!
However, the torrenting hash algorithm is very sensitive and requires additional consideration. Even if the actual binary files inside your web media blocks have not changed, other ostensibly superficial changes such as code signing time stamps, file dates and times, and so forth; would result in physically distinct 7zip file binaries. The torrenting hash algorithm will pick up all of these changes to ensure data integrity during decentralized peer to peer data transmission.
As such, if any setup you rebuild modifies 7zip file binaries at all - even when the files contained inside the corresponding web media blocks are identical - you would need to re-seed the updated files following the instructions above.
Furthermore, you would need to continue seeding the former 7zip files as well - assuming, of course, that you wish to maintain your older installation versions already out in the field, depending on these 7zip files.
As an alternative to maintaining an ever growing stack of 7zip files for each corresponding build and rebuild of web media blocks, you may skip rebuilding web media blocks when there are no more than superficial changes to the contained files.
Another alternative for web media blocks representing static items such as application runtimes is to use pre-compiled application runtimes would ensure your 7zip files never change - as they would never get recompiled past the point of initial pre-compilation.
Seeding Shared Web Media Blocks
The same concern above applies to web media blocks which are shared amongst setups.
Ordinarily, a particular shared 7zip file may even have more data than necessary (offering the biggest superset of files amongst all its client setups), where each client setup will simply consume the required bits. Or, it may simply be a web media block for something like an application runtime, which would carry payload fully consumed by all client setups.
Sharing a 7zip file hosted on the torrent network amongst multiple setups requires a few additional steps, considering that the torrent hashes are very sensitive to even superfluous changes in actual paylods (the only exception being pre-compiled application runtimes which would always be identical due to their nature):
- Normally and fully (without skipping any web media blocks) build (and seed) the setup which is the superset (in terms of breadth of content) of all the other setups dependent on the web media blocks being shared.
- When building client setups which are subsets (in terms of content), skip building shared web media blocks and manually inject the torrent files for the shared 7zip files inside the subfolder of your client setup project folder.