Turn's BitTorrent Java library (tracker and client) plus few missing features: use torrent announce list, downloads > 2GB, UDP trackers, DHT protocol.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 23 commits ahead, 874 commits behind mpetazzoni:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
JDownloader plugin
dist
lib
src
.gitignore
COPYING
INSTALL
README
build.xml

README

Changes in relation to the original version
===========================================

- connects to all trackers from torrent file,
- connects to UDP trackers,
- allows to download files > 2GB,
- binds to all interfaces instead of localhost,
- connects to DHT peers.

TODO: 
- look at the uTorrent communication,
- secure connections. 

A Java implementation of the BitTorrent protocol
================================================

This is a pure-Java implementation of the BitTorrent protocol, providing a
BitTorrent tracker, a BitTorrent client and the related Torrent metainfo files
creation and parsing capabilities. It is designed to be embedded into larger
applications.

This tool suite was implemented as part of Turn's (http://www.turn.com) release
distribution and deployment system and is used to distribute new build tarballs
to a large number of machines inside a datacenter as efficiently as possible.
At the time this project was started, few Java implementations of the
BitTorrent protocol existed and unfortunately none of them fit our needs:

* Vuze's, which is very hard to extract from their codebase, and thus complex
to re-integrate into another application;
* torrent4j, which is largely incomplete and not usable;
* Snark's, which is old, and unfortunately unstable;
* bitext, which was also unfortunately unstable, and extremely slow.

This implementation aims at providing a down-to-earth, simple to use library.
No fancy protocol extensions are implemented here: just the basics that allows
for the exchange and distribution of files through the BitTorrent protocol.

Although the write performance of the BitTorrent client is currently quite poor
(~10MB/sec/connected peer), it has been measured that the distribution of a
150MB file to thousands of machines across several datacenters took no more
than 30 seconds, with very little network overhead for the initial seeder (only
125% of the original file size uploaded by the initial seeder).


License
-------

This BitTorrent library is distributed under the terms of the Apache Software
License version 2.0. See COPYING file for more details.


Authors
-------

* Maxime Petazzoni <mpetazzoni@turn.com> (Platform Engineer at Turn, Inc)
  - Original author and maintainer
* David Giffin <david@etsy.com>
  - Contributed parallel hashing and multi-file torrent support
* Thomas Zink <thomas.zink@uni-konstanz.de>
  - Fixed a piece length computation issue when the total torrent size is an
    exact multiple of the piece size.


Caveats
-------

* Client write performance is a bit poor, mainly due to a (too?) simple piece
  caching algorithm.
* End-game can be slow if the peer selected to retrieve the last piece from
  doesn't upload fast enough (or at all). An end-game scenario should be
  implemented.

Contributions are welcome in all areas, even more so for these few points
above!