torrentCDN is a CDN (Content Delievery Network) tool written in Java that leverages the BitTorrent protocol to transfer files between each target node.
For Vanderbilt University CS 278:
This project makes has the following properties.
- Spec laid out in user stories on Pivotal Tracker https://www.pivotaltracker.com/s/projects/954698
- Has unit tests (ran by maven during build system)
- Has integration tests ()
- Is well-designed and implemented
- Involves network communication
- Uses a continuous integration server
- Uses multi-host Vagrant
- Manages nodes with Fabric
- Uses custom non-http network built on top of a framework (Uses BitTorrent.)
There are several packages required to build and run this project
- Java-JDK 7.0
- maven 3.0
- vagrant
- puppet
- python
- fabric
There are 2 projects created:
- client: acts as both the 'seeder' and 'leech' applications, depending on file placement
- tracker: The BitTorrent Tracker that allows all the clients to connect.
Due to the limitations of the library I'm using for BitTorrent capabilities, manual installation of the library to your local maven repositoy is needed (because they do not have a public jar listed for maven repo access.) by executing:
. ./requiredToRun/installReqLibraryToMaven.sh
This requirement should be lifted soon, as I've discussed with the library's creator about them adding their work to a maven repository. That work is being done now, but is still incomplete.
To build the client software
cd client/
mvn clean install
To build the client tracker
cd tracker/
mvn clean install
To Test the client and tracker run:
vagrant up (NOTE:this might take a while to execute)
fab tracker trackerStartBG
fab seeder seederStartBG
fab leech leechStartBG
The torrent file located at 'torrents/testfile1.txt.torrent'
It is used by all 3 VMs to configure what file to seed (file-o/testfile1.txt) and what to copy to the leech instance(s) (file-n/testfile1.txt)