libp2p / libp2p/specs

Specify transport interface

Open
#182 0 comments 2 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

Right now we don't really have a spec for the transport interface. The archived original spec linked to the interface-transport repo, but that repo is quite javascript-focused, with Go marked as WIP.

I'd like to write up a minimal definition of a transport in a platform-agnostic way, which is something I'm not quite sure how to do yet. The go and js interfaces diverge a bit (for example, go has a CanDial method that js lacks), and it's likely that no single API will feel idiomatic in all languages libp2p is implemented in.

However, it seems like it should be possible to spec out the required capabilities of a transport, either as pseudo-code or by just enumerating them and describing in prose.

This doc could also be a place to precisely define the "connection" and "stream" abstractions, and a future work section could mention message-orientation and discussions around supporting unreliable transports.

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

Start by reviewing the archived interface-transport repository and comparing the existing Go and JavaScript transport interfaces, especially the differing capabilities such as CanDial. Define the required transport, connection, and stream capabilities in platform-agnostic prose or pseudocode, and record message orientation and unreliable transport discussions as future work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
documentation, networking
Issue type
Documentation
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.