libp2p / libp2p/specs

Idea: Friendly Streams

Open
#500 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

Libp2p has streams, but they're really annoying:

  1. They take up resources when not in use, so we usually treat them as ephemeral. But this gets really annoying when we want to send ordered messages on a stream that's usually idle (gossip, etc.).
  2. They don't migrate across connections (proposal in #406).
  3. They won't re-try and/or re-form on failure. We have quite a bit of code to try sending a message on a stream, only to open a new stream and re-try.

We should consider adding user-space stream layer that can:

  1. Suspend the underlying transport stream to free all buffers.
  2. Migrates and re-creates streams.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the existing stream behavior described here and proposal #406 first, then map how idle streams, connection migration, and failure recovery currently work. Done means a settled user-space stream design that can suspend transport resources and migrate or recreate streams, with its scope and behavior specified.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.