libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.56k stars 273 forks source link

Create spec legend and terminology guideline #565

Open SgtPooki opened 1 year ago

SgtPooki commented 1 year ago

Summary

To prevent the confusion of terminology when reading specs, we should use consistent language and provide a document similar to https://github.com/libp2p/specs/blob/master/00-framework-02-document-header.md that spec-writers can use to ensure language across specs is consistent and clear.

Description

I’ve only read two libp2p specs so far, but I think the specs could be clearer if we started using consistent terminology for peers and streams in our spec descriptions.

e.g.

I could not find existing guidelines or recommendations for writing legends or using terminology in libp2p specs. I think solidifying a guideline for the terminology in libp2p specs would help spec readers.

Proposal

We could create a single global legend (for naming of peers in a spec) but we will need individual legends per spec to define contextually relevant names for streams/connections/messages.

Example

Term Definition
Leader The Peer who begins/initiates the connection with the Participant peer
Participant The Peer who receives/acknowledges the connection and streams with the Leader peer
Negotiation-stream An initial stream created in an existing connection between Leader and Participant peers.
Goal-stream A new stream, using an "upgraded" transport when compared to the Negotiation stream, created on a new connection between leader and participant peers.

References to confusion/assumptions around terminology

mxinden commented 1 year ago

Thank you for the detailed suggestion.

I am not opposed to this proposal. Definitely see the value for consistent and descriptive naming.That said, I don't have the priority to push this forward any time soon. In case you do, happy to help along the way.