
The Torrent Updater application is set of Windows Services, using WCF (Windows Communication Foundation) and Microsoft's Message Queueing technology (MSMQ) to create set of file updates and distribute them to remote workstations (concrete trucks). This project leveraged BitTorrent technology to distribute these updates. By selecting the BitTorrent technology we were able to easily implement the following features:
- Downloads are resumable.
- No risk of file corruption.
- Leverages Peer-2-Peer to both increase transfer speeds, and prevent bottlenecks/flooding a central server with a normal downloading architecture.
This project arose from a need to update software installed on the trucks. Rather than bring a USB drive to each truck, Reliant constructed the Torrent Updater program to handle updating files on the trucks. The updates can consist of arbitrary files that are downloaded onto the trucks, and a separate file (currently PowerShell scripts) will be downloaded and will initiate the actual file replacements. The concrete trucks may or may not have network connectivity at any given time, so the need for an interruptible download process was necessary. With Torrents, we can also get guaranteed protection from file corruption, because the BitTorrent protocol protects against this. Reliant leveraged the open-source MonoTorrent .NET library.
The service consists of five custom "trackers" running on a central server, and each truck has a custom "client" service running that will check a Messaging Queue (via MSMQ) for new Torrent files and begin the download process. Because of the way torrents work, it will then connect to all other trucks (peers) on the same network, transferring pieces of the Update between each other, lowering the load on the central server while maintaining high download speeds.