Skip to content
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

Blockservice Session #4138

Open
Stebalien opened this issue Aug 12, 2017 · 0 comments
Open

Blockservice Session #4138

Stebalien opened this issue Aug 12, 2017 · 0 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@Stebalien
Copy link
Member

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.

@whyrusleeping whyrusleeping added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants