Skip to content

datagrams: Add initial datagram draft#680

Open
MarcoPolo wants to merge 4 commits into
masterfrom
marco/datagrams
Open

datagrams: Add initial datagram draft#680
MarcoPolo wants to merge 4 commits into
masterfrom
marco/datagrams

Conversation

@MarcoPolo

Copy link
Copy Markdown
Contributor

Initial text for specifying how datagrams will work on libp2p.

cc @raulk @sukunrt @jxs

@marten-seemann marten-seemann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered tying a datagram flow to a stream, similar to what HTTP DATAGRAMS (RFC 9297) does?

This would have the following benefits:

  1. Shorter datagram header (especially important given MTU restrictions).
  2. Both peers get the opportunity to cancel a datagram flow (by closing / resetting the associated stream).
  3. A reliable control channel, e.g. for application protocols that need to send an occasional control message next to a datagram flow.

@MarcoPolo

Copy link
Copy Markdown
Contributor Author

Thanks @marten-seemann! That's a nice idea. We can include the versioning information in the stream as well so we don't pay that overhead on every datagram. The datagram itself then only has a single varint of overhead.

@johannamoran

Copy link
Copy Markdown

@jxs - I've reached out to zig, nim, py and dotnet for feedback to get this moving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants