Skip to content
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

Libp2p tutorials and demos #202

Closed
whyrusleeping opened this issue Jun 26, 2017 · 12 comments
Closed

Libp2p tutorials and demos #202

whyrusleeping opened this issue Jun 26, 2017 · 12 comments

Comments

@whyrusleeping
Copy link
Contributor

I would like to start pushing for more demos and tutorials on working with libp2p. If you have any ideas on what sort of content you want to see, please let us know here!

@ghost
Copy link

ghost commented Jun 26, 2017

Two categories of tutorials:

  • How to use libp2p
    • chat application? :)
  • How to develop libp2p
    • navigating where stuff is
    • creating patches for some component
    • adding and testing a new transport

@victorb
Copy link
Member

victorb commented Jun 28, 2017

Yeah, would be useful to have a walk-through of terminology used (with links to more information), how the concepts are being used and how they tie together and for what reason. Might be easier to explain with explicit use-cases, like chat application.

Might be a fun idea to have a tutorial for writing your own IPFS-lite as well, to be able to explain how libp2p ties into IPFS.

@nvonpentz
Copy link

Yes, I examples would be helpful. Specifically I am looking of an example demonstrating how to establish a connection between two computers behind NAT.

@larskluge
Copy link

Currently all golang examples demonstrate libp2p on localhost only. It would be great to have a basic example that goes beyond client <> server and demonstrates the power of libp2p. mdns/discovery, if necessary w/ Circuit Relay. An example as @nvonpentz asks for too.

@diasdavid any chance you could translate one of your more advanced JS examples here? The interfaces are too different for me w/ 0-day-experience to do it myself. Happy to help and contribute for better examples.

@avive
Copy link
Contributor

avive commented Nov 27, 2017

Please consider this little example - I think it will be useful for real world p2p apps written in go: #249 . It is based on the Protocol Multiplexing using multicodecs with libp2p example but shows how to do protocol multiplexing using multi-codecs with and how to use protobufs to easily create an RPC-like p2p protocol (Req & Resp) p2p api. It is quite trivial to use this app for adding additional app-level protocols to this example to create a robust p2p app. Currently 2 protocols are implemented - Ping and Echo.

@agahEbrahimi
Copy link

@whyrusleeping A tutorial that has Nat Traversal, Discovery, Content/peer routing, and transport would be perfect.

@whyrusleeping
Copy link
Contributor Author

@agahEbrahimi so if i finish up this tutorial/example: https://gist.github.com/whyrusleeping/169a28cffe1aedd4419d80aa62d361aa would that satisfy what youre looking for?

@agahEbrahimi
Copy link

@whyrusleeping That would be perfect. (does it work over the internet?)

@whyrusleeping
Copy link
Contributor Author

Yeah, it should work over the internet, just have to make sure your swarm listen addresses are 0.0.0.0 (or some external address) and not 127.0.0.1

@agahEbrahimi
Copy link

agahEbrahimi commented Apr 17, 2018

@whyrusleeping
Where can I specify that? when I'm running the unix executable?
and can that app be run on different networks?

@whyrusleeping
Copy link
Contributor Author

@agahEbrahimi it would need to be passed as an option to the libp2p constructor. I didnt expose it as a command flag in my tutorial

@Stebalien
Copy link
Member

There is now an entire examples directory.

marten-seemann pushed a commit that referenced this issue Aug 17, 2022
Specifically, move them _here_ from the peerstore. That way
packages (like the DHT) that currently directly rely on the peerstore,
can just use go-libp2p-core.

Moved from https://github.com/libp2p/go-libp2p-peerstore/blob/f7f22569f7d49635953638ffb11915dd3d054cf5/peerstore.go#L79-L93

With some small modifications.
@MarcoPolo MarcoPolo mentioned this issue Jul 14, 2023
29 tasks
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

7 participants