Skip to content

Tutorial proposal: Implementing a Protocol #46

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

Closed
lmars opened this issue May 20, 2019 · 2 comments
Closed

Tutorial proposal: Implementing a Protocol #46

lmars opened this issue May 20, 2019 · 2 comments

Comments

@lmars
Copy link
Contributor

lmars commented May 20, 2019

This is a proposal for a tutorial to follow the current "Getting Started" tutorials based on what I would have found useful as I've been getting to know libp2p in the last week or so.

The tutorial would be called "Implementing a Protocol" and would cover:

  • Defining a protocol ID and setting a stream handler
  • Reading and writing protocol data
  • Defining a set of structured messages that make up the protocol
  • Encoding / decoding protocol messages
  • Handling different types of messages
  • Handling an async request / response flow
  • Handling protocol upgrades (i.e. version bumps, semver matching)

Rather than making up a protocol, I suggest using an existing, simple protocol that's easy to understand and doesn't distract from the point of the tutorial, perhaps JSON-RPC over libp2p?

@yusefnapora WDYT? I'd be happy to draft a Go version of this if you think it would be useful? I always like sharing my learning experience to make it easier for others 😄

@yusefnapora
Copy link
Contributor

That sounds like a great plan. I can work on the JS side while you're working on Go, if you like. This sounds like fun 😄

@p-shahi p-shahi removed this from go-libp2p Aug 26, 2022
@p-shahi
Copy link
Member

p-shahi commented Aug 26, 2022

closing in favor of #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants