-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
Two categories of tutorials:
|
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. |
Yes, I examples would be helpful. Specifically I am looking of an example demonstrating how to establish a connection between two computers behind NAT. |
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. |
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. |
@whyrusleeping A tutorial that has Nat Traversal, Discovery, Content/peer routing, and transport would be perfect. |
@agahEbrahimi so if i finish up this tutorial/example: https://gist.github.com/whyrusleeping/169a28cffe1aedd4419d80aa62d361aa would that satisfy what youre looking for? |
@whyrusleeping That would be perfect. (does it work over the internet?) |
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 |
@whyrusleeping |
@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 |
There is now an entire examples directory. |
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.
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!
The text was updated successfully, but these errors were encountered: