Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Matthews Lab
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
P2pd
(section)
Page
Discussion
British English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= How P2PD compares to Libp2p = Libp2p is currently the most popular library for peer-to-peer networking. There are implementations of Libp2p in many languages and the Go version appears to be the most complete. A question I see arising is ‘how does P2PD compare to Libp2p?’ I won’t write a full essay here but here are the cliff notes. <details> <summary> Show Libp2p comparison </summary> # '''Libp2p’s implementation of TCP hole punching is poor''' and will result in lower success for direct connections. The reason for this is it’s NAT enumeration code doesn’t account for a basic range of NAT behaviours used by routers. Furthermore, there appears to be no way for nodes to synchronise hole punching which will result in higher failure rates for low latency connections. # '''Libp2p’s address format has insufficient detail for common scenarios.''' For example, if someone hosts a server in the same LAN, a Libp2p address cannot identify that server. Should a server’s port be closed – the address provides no information on a node’s NAT details to help with NAT traversal. # '''Libp2p reinvents the wheel for common protocols.''' Libp2p uses custom protocols for address lookup, signalling, and relaying. Consequently, they cannot take advantage of public infrastructure or the open source software that already exists. All of Libp2p’s custom protocols have established alternatives: STUN, MQTT, and TURN. # '''Libp2p glosses over network interface management.''' As Libp2p nodes were not designed with multiple interfaces in mind they are not able to outright use alternative NICs that may have more favourable NAT configurations for peer-to-peer networking. # '''Libp2p seems to have a weak culture around testing.''' Libp2p has a small number of unit tests and seems to have virtually no infrastructure in place for live testing. Networking code needs to interact with real systems to know it works. So running your own echo servers; test nodes; is important. TL; DR: It seems that every aspect of Libp2p that ought to not have been over-engineered – has been – while the things that would have benefited from added attention (like a robust address format and NAT traversal techniques) have been the most neglected. I think many of Libp2p’s approaches show a poor understanding of networking. </details> <span id="support-for-other-languages"></span>
Summary:
Please note that all contributions to Matthews Lab may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Matthews Lab:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)