ipfs/kubo

API for tracking data locallity and transfer progress

Open

#4028 opened on Jul 3, 2017

View on GitHub
 (2 comments) (2 reactions) (0 assignees)Go (13,906 stars) (2,725 forks)batch import
help wantedkind/enhancementneed/community-inputstatus/readytopic/api

Description

For my project (https://github.com/MichaelMure/TotallyNotArbore) I need to be able to solve two problems:

  1. is this hash present locally, and if not, what percentage is here ?
  2. progress statistics would be nice to have (rateIn, rateOut, peersIn, peersOut)

This could be done different ways:

  1. ipfs repo has hash or ipfs refs local hash --> yes/no/%
  2. add some logs for added/removed block and use ipfs log to track what is going in and out of the repository. I actually did that at some point (https://github.com/ipfs/go-ipfs/pull/1892) but it has been deleted in a refactoring. It also mean that the app using ipfs has to replicate the graph of block in memory and track what happen. Not a fan of this solution
  3. ipfs repo feed --> feed of added/removed blocks. Again, this means that the app has to track everything.
  4. ipfs stats progress hash... or ipfs stats bw --hash hash... --> [{ hash, local, progress, rateIn, peersIn, rateOut, peersOut }, ...] It would output a feed of progress for a set of hash, as well as statistics of bandwidth and number of peers participating.

Before I start working on this, I'd like to know if it's something that could be merged in IPFS and what form should it take. Also, I'm not sure what would be practical to implement with the current codebase.

The minimal and easiest to implement is 1.. I would prefer to have something like 4. as well.

Contributor guide