You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a "next step" in bitswap sessions, sessions should rank peers and ask progressively more peers for content. There are two parts to this:
Peer Tracking (ConnManager)
We'll probably need to track peer preference similar to how we currently track peer usefulness. Tracking usefulness allows us to decide how much we need the peer, tracking preference would allow us to decide if/when we should use the peer. We'd probably make this some function of:
Latency (given a request for a block, how quickly does the peer reply).
Cost (in the future, some links may cost more; e.g., relays).
Load (we should down weight peers we use a lot).
However, for now, we can probably just track latency (with a rolling average?).
Note: Technically, we don't have to use the ConnManager. We could use something else. However, IMO, the connmanager is the correct place to track this info.
Implementation
There are probably many ways to go about this but personally, I'd add the following functions to ConnManager:
typeConnManagerinterface {
// Register a tag as having importance proportional to `weight` in `property`.RegisterTag(property, tagstring, weightint32)
UnregisterTag(property, tagstring, weightint32)
}
Then, I'd use these weights when computing the "usefulness" and "preference" of peers.
Progressive Requests
On the bitswap session side, we'd want to progressively ask more and more peers for content, asking the lowest latency peers first.
The text was updated successfully, but these errors were encountered:
As a "next step" in bitswap sessions, sessions should rank peers and ask progressively more peers for content. There are two parts to this:
Peer Tracking (ConnManager)
We'll probably need to track peer preference similar to how we currently track peer usefulness. Tracking usefulness allows us to decide how much we need the peer, tracking preference would allow us to decide if/when we should use the peer. We'd probably make this some function of:
However, for now, we can probably just track latency (with a rolling average?).
Note: Technically, we don't have to use the ConnManager. We could use something else. However, IMO, the connmanager is the correct place to track this info.
Implementation
There are probably many ways to go about this but personally, I'd add the following functions to ConnManager:
Then, I'd use these weights when computing the "usefulness" and "preference" of peers.
Progressive Requests
On the bitswap session side, we'd want to progressively ask more and more peers for content, asking the lowest latency peers first.
The text was updated successfully, but these errors were encountered: