How to collect statistics from the piano?

I want to collect statistics from file distribution in a new bittorrent swarm without downloading anything (or as little as possible). I need to know which of the peers has which parts (to create statistics based on files), knowing the number of seeders and liquors or percent, is not enough. Later, when there are many peers, I need to download data to determine what it is. This part can be done using a regular torrent client.

I do not plan to implement the protocol myself, so I looked at 2 implementations of libtorrent and ktorrent libbtcore. None of them are capable of collecting data, but not downloading, there are simply no connected peers when there is nothing to download. Libtorrent is simpler, but ktorrent looks better.

I see 3 possibilities:

  • Use this app to do this. Whether there is a?
  • Change the torrent implementation to do what I want. Anyone familiar with them? Where to begin?
  • Introduce a small subset of the protocol. Just ask peers periodically what they have. Is this possible, or should the program support an almost complete protocol?

What do you recommend?

+3
source share
1 answer

This is an old question, but perhaps this answer may be useful to others.

  • Use this app to do this. Whether there is a?

Not that I knew.

  • Change the torrent implementation to do what I want. Anyone familiar with them? Where to begin?

I am only familiar with the core of BitTornado (which is used, for example, in ABC). It is written in Python, but it is an architectural mess.

However, you can simply execute any implementation and begin to remove it from unnecessary functions.

  • Introduce a small subset of the protocol. Just ask peers periodically what they have. Is this possible, or should the program support an almost complete protocol?

, "" , . , , ( , ). BitTorrent bitfield , . HAVE, . , , . , BitThief.

, BitTorrent . ( ) uTorrent PEX-. PEX .

HAVE.

+3

Source: https://habr.com/ru/post/1733702/


All Articles