Giter VIP home page Giter VIP logo

bittorrent's Introduction

6.824 Final Project

For our final project for MIT's 6.824 (Distributed Systems), our team implemented a Bittorrent client and tracker in Go.

Team Members

  • Nicole Glabinski (nicolekg)
  • Everardo Rosales (erosales)
  • Kimberli Zhong (kimberli)

Requirements

Requires Go 1.8 or greater, for shutdown of HTTP servers.

You'll also need to install http://github.com/zeebo/bencode/. In the src folder, run go get github.com/zeebo/bencode.

Usage

To run either the tracker or client, go in to src/main and run go run main.go. Run the tracker with flag -tracker and run the client with flag -client. Specify the .torrent file you want to use with -torrent=<NAME>. Other flags include -debug, -port, and -persister, which allows you to save progress to a specific file or restart a stopped download.

You can also generate .torrent files using the main utility. Run a command like go run main.go -generate -torrent=out.torrent -file=<filename> -url=<tracker url>.

Development

  • src/client - code for the client
  • src/tracker - code for the tracker
  • src/fs -
  • src/btnet -
  • src/github.com -
  • src/util - utils for development (e.g. debug printing)
  • src/main - the main command-line utility

Testing

Automated Testing

Run tests with go test in the following directories:

  • src/btnet - network
  • src/client - client
  • src/fs - torrent file utilities
  • src/main - integration tests
  • src/tracker - tracker
  • src/util - general utilities

The file main/torrent/test.torrent is used in our unit tests and was downloaded from https://downloads.raspberrypi.org/raspbian_lite_latest.torrent in May 2017. Other test torrents used are in main/torrent.

Manual Testing

Run manual tests with the following commands:

  • go run main.go -tracker -port=8000 -torrent=torrent/puppy.torrent -debug=Info
  • go run main.go -client -port=8001 -torrent=torrent/puppy.torrent -file=out.jpg -debug=Status -persister=download_progress
  • go run main.go -client -port=8002 -torrent=torrent/puppy.torrent -seed=seed/puppy.jpg -debug=Status

bittorrent's People

Contributors

kimberli avatar everrosales avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.