ipfs-inactive / bitswap-ml

[ARCHIVED] bitswap + ml
5 stars 3 forks source link

Features #1

Open kbala444 opened 9 years ago

kbala444 commented 9 years ago

Here's a preliminary list of features we might be able to use to classify potential peers:

  1. How often the peer loses it's ledger
  2. Debt ratio of peer
  3. Average latency of connection to peer
  4. Available bandwidth of peer
  5. Demand/rarity of block we are trying to obtain from peer (maybe if the block is rare we should tolerate slower connections/less bandwidth)
  6. Total uptime of peer

I'm not too sure how difficult it will be to obtain data for some of these.

whyrusleeping commented 9 years ago
  1. Available bandwidth of peer

This is the bandwidth between the remote peer and us? That one might be really hard to gague.

  1. Total uptime of peer

This is currently available through the ipfs net diag functionality, but dont expect it to stick around. We might be able to add some basic information exchange into the handshake, but that could be faked. Maybe a better heuristic is "lifetime of our connection to them"

kbala444 commented 9 years ago

Maybe instead of bandwidth we could try a partial download like in Adaptive Peer Selection and use the average download speed in the first N seconds as the feature? The cost of doing this might not be worth it though.

Is lifetime of our connection the time we've been connected to a peer?

jbenet commented 9 years ago

some more:

may also want to test multiple functions over variables (e.g. mean, median, total, variance, max, min, etc).

whyrusleeping commented 9 years ago

Is lifetime of our connection the time we've been connected to a peer?

yes. which is a debateable metric, but we cant trust peer to be honest about their uptime. we can only use features that we can observe ourselves.