Google calendar

Monday 6 June 2016

DHT in java

Available libraries for torrent in java.

  1. frostwire-jlibtorrent
  2. ttorrent
 Comparison 

Sr No.
Feature
Frostwire-jlibtorrent
Ttorrent
1
DHT
Yes
No
2
Magnet uri
Yes
No
3
License
MIT license
Apaches Software License 2.0

Rest main features are present in both.
Ttorrent has more stars than frostwire-jlibtorrent on github.


References
1] https://github.com/frostwire/frostwire-jlibtorrent
2] https://github.com/mpetazzoni/ttorrent 

Sunday 5 June 2016

Dat

Dat

dat is similar to ipfs, p2p file sharing. Earlier dat's goal was to allow sharing and versioning of tabular data(csv), json. dat alpha was more about syncing non tabular files, single centralized repository like Dropbox. you can read here more about how dat evolved.


Current api 1.0 has only two commands dat link and dat <share-link>. The debug flag prints more output like bittorent-dht node queries.

Unlike ipfs dat sha256 hash also considers file modes(permissions) among the other filesystem metadata. Dat uses a variety of different methods to discover peers that have the data it's looking for, including DNS, Multicast DNS, UDP, and TCP. Like ipfs it also has bootstrap nodes.

Key differences to BitTorrent

Although file sharing using Hyperdrive on the surface could seem similar to tools such as BitTorrent there are a few key differences.

  1. Not all metadata needs to synced up front

  2. BitTorrent requires you to fetch all metadata relating to magnet link from a single peer before allowing you to fetch any file content from any other peer. This also makes it difficult to share archives of 1000s of files using BitTorrent.
  3. Flexible and consistently small block sizes

  4. BitTorrent requires a fixed block size that usually grows with the size of the content you are sharing. This is related the above mentioned fact that all metadata needs to be exchanged from a single peer before any content can be exchanged. By increasing the block size you decrease the number of hashes you need to exchange up front. Flexible block sizes also allow for more non file related use cases, such as the file metadata feed described above.
  5. Deduplication

  6. BitTorrent inlines all files into a single feed. This combined with the fixed block sizes makes deduplication hard and you often end up downloading the same files multiple times if an update to a torrent is published.
  7. Multiplexed swarms

  8. Unlike BitTorrent, wires can be reused to share multiple swarms which results in a smaller connection overhead when downloading or uploading multiple feeds shared between two or more peers.

Good read, documentation [1] 
and the dependencies [2]