Libp2p – A modular network stack
libp2p.io
libp2p.io
Near the end it says it's being developed by people in the IPFS community. Does anyone know for what they plan on using it?
Yes, we use it today! libp2p is the P2P Networking Stack of IPFS that we refactored into its own project so that others could take advantage and be part of its ecosystem as well.
It is what gives IPFS and other projects the P2P connectivity, support for multiple platforms (including Browsers) and more! There are 3 implementations interoperable today at different stages of completion (Go, JS for Node.js & Browser and Rust). Full overview here https://www.youtube.com/watch?v=CRe_oDtfRLw
Also, Chris Pacia recently delivered an amazing talk at QCON about libp2p https://www.infoq.com/presentations/blockchain-libp2p, I totally recommend checking it out.
You can find more talks of examples and use cases at https://libp2p.io/media.
Give it a spin and post feedback on github.com/libp2p. We are also on #libp2p on freenode, come say hi!
Ethereum is the only example I've found that comes close, but it's poorly commented and only implements a small set of details of libp2p.
Developing with the library essentially comes down to protobuf serialization logic inside a router with the path being the name of your protocol, just like you would in rails or node, everything else is handled by the library. To talk to a peer over your protocol you just need their address on the network (public key), your protocol name and to serialize your protobuf data to be written over the network, the libraries handle dialing/routing through connected peers if its not possible to directly connect to the peer.
Also found it very annoying using it. Coupled with the multi-whatever repos, that they make backwards incompatible changes, and they use IPFS paths in some of their imports (iirc) made for a non-welcoming library experience.
Why would anyone store different laguage implementations in the same Git repo?
I mean, let's flip it around: when I need a lib for language X, why would I want to download it also for languages V, Y, and Z (+ all language-specific cruft)? Especially in this day and age, when dependency management in project involves build systems pulling repos automatically?
Or, put another way, library is one project. Python wrapper/client is a different project. Go wrapper/client is yet another project. Etc.
That would also allow others to write clients for their favorite languages.
[0] https://github.com/golang/go/wiki/cgo#calling-go-functions-f...
C++'s improved safety over C, while providing such accessibility.
We are after all talking about network protocols, where security should be number one feature.
There are other P2P transport alternatives, check out SSB's (it is really good!) or ours (gun.eco/docs/DAM) which prevents flooding. WebRTC and websocket implementations exist.
In any case, floodsub is just one option you can use for pubsub on top of libp2p (one with a notably high level of reliability and minimal cross network latency for infrequent messaging). We also have a tree pruning gossiping implementation called gossipsub. Take a look at the spec: https://github.com/libp2p/specs/blob/master/pubsub/gossipsub...
> The meshsub router offers a baseline construction with good amplification control properties, which we augment with gossip about message flow.
This is notoriously hard to get right. How to prevent spam, posioning or Sybils in your gossip network? Scientific work on p2p overlays and gossip is hard to publish now at venues like Usenix or NSDI. After Newscast from 2003 it seems you need strong identity to make these systems attack resilient. An unsolved problem.
Thank you for this insight! We will put a university student team on exploring this likely vulnerability in IPFS/libp2p.