New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose bitswap sessions through a global flag #5994
Comments
Hi, this would be super useful for Cluster, particularly in |
So, this is a sizable undertaking but potentially worth it. It would need to track sessions all the way down through DagService -> BlockService -> Bitswap to be useful. Marking it an open and valid feature request but not sure if/when we will get to it. |
This may be easier than you think. We already expose bitswap sessions all the way up to CoreAPI. |
so quick glance at the code showed me the following:
|
Heads up that this is no longer high prio for Cluster since we decided to run the whole exchange internally and use cluster's DHT and swarm to exchange that data so we have access to sessions. It might be useful in the future though, for getting pinned content block-by-block when that content is sharded across multiple ipfs peers. |
We could expose sessions to commands through a global flag, which would take a random session id, and potentially some parameters, like timeout:
First invocation would create the session and store it somewhere, second and third would re-use it, after 3-rd get is done, the session would get removed.
We should also consider creating sort of 'session GC' to cleanup sessions in case we accumulate too many (and to make it safe to expose on gateway port)
cc @Stebalien @hannahhoward
The text was updated successfully, but these errors were encountered: