Blockservice Session
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
Currently, adding blocks races with the GC. One solution is to add blockservice sessions (kind of like bitswap sessions) that prevent all blocks retrieved and/or added through the session from being garbage collected while the session is active. Note: This is not true pinning because we wouldn't bother persisting sessions to disk.
---
Aside:
Ideally, we'd expose this over the API by transparently opening a new session (bitswap+blockservice+other...) per client/connection (allowing clients to explicitly open new sessions as needed). Unfortunately, HTTP is a connection less protocol so it would be fairly difficult to keep a session open this way between requests. An alternative is to literally just use very short-lived session cookies.
Really, we should add a websocket RPC API and encourage clients to use that. It might still be a good idea to have short-lived session cookies (to allow reconnects) but this becomes less of a problem.
Contributor guide
Assessment
This issue has not been assessed yet.