BitTorrent

BitTorrent protocol

BitTorrent protocol is a peer-to-peer file sharing protocol. It works very differently from the traditional p2p files sharing protocol.

Traditional file sharing protocol uses client-server model, where a single server provides the downloading service for multiple clients. All clients download files from the single server. This system is centralized.

BitTorrent protocol allows a user to join a ‘swarm’ of hosts to upload files to and download files from other hosts simultaneously. This system is decentralized, or distributed. The shared file is split into a number of blocks/segments/pieces. A user can download different pieces from a number of different peers at the same time. The user who wants to share a file to others has the initial file and it has to be the first seed/seeder, so others can download it from this host. Any other peer who has finished downloading the file and already have a complete copy of the file becomes a seed/seeder and start to uploading data for other peers.

The first step to share a file is to create a torrent descriptor, a torrent file. It contains the meta data about the file to be made available, including the size of each piece, the hash string, and a tracker list. the file is then made available to other users, usually by sharing on internet. It is of much small size. Other users then download this torrent file and use a BitTorrent client application open it to start downloading. How does a user know how many peers there are in the swarm and which one of them has a copy of the file he wants? This where the tracker works.

A tracker is a server which keeps track of which seeds and peers are in the swarm. Each peer report information to the server and in exchange receive information from the server about other clients. The tracker is not directedly involved in data transfer and does not have the content of the shared file. [The underlined are from Wikipedia]. Because the torrent file has the information of tracker(s), the client app gets the URL of the tracker(s) and connects to the server(s) to get information about other clients and the information about the file he wants.
There are some clients who just want to download from others but refuse to be a seeder (to provide uploading) or just have a very load uploading ratio. Those clients are called leecher.

Key terms

  1. Block/Piece
    When a file is to be shared via BitTorrent, it is broken into small blocks/pieces. The size of blocks/pieces varies with the size of the file to be distributed. Breaking the file into pieces make the distribution as efficient as possible.
  2. Swarm
    A group of hosts using BitTorrent protocol to share files. They work together to upload to and download from others peers simultaneously.
  3. Leech/Leecher
    A leech/leecher is a peer that only downloads from others and does not provide uploading to others or provides very few.
  4. Peer
    one of the clients of the swarm
  5. seed/seeder
    a peer which has a complete copy of a file and starts to provide uploading to others
  6. Tracker
    A server which keeps track of which seeds and peers are in the swarm. Each peer report information to the server and in exchange receive information from the server about other clients. The tracker is not directedly involved in data transfer and does not have the content of the shared file
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值