py-ipv8 icon indicating copy to clipboard operation
py-ipv8 copied to clipboard

Document DHTCommunity

Open qstokkink opened this issue 2 years ago • 1 comments

The DHTCommunity (and its subclass the DHTDiscoveryCommunity) have very useful functionality to store data and to connect to peers based on their public key. This functionality allows IPv8 to serve as both a distributed file system and allows programmers to both create neighborhood persistence and superpeer networks.

We may want to leave IPv8-as-a-file-system functionality out of the documentation to avoid competing with Tribler's solution. However, it would be useful to give an example of storing known peers on custom Community.unload() and attempting to reconnect when initializing (i.e., neighborhood persistence). This one example would also cover "find-your-friend"/superpeer functionality.

qstokkink avatar Apr 11 '22 08:04 qstokkink

This tutorial could build off of the Network snapshotting used in the TriblerTunnelCommunity (see https://github.com/Tribler/tribler/blob/76ed927339a73d7b3c8464e8a4b43cf8a520e2d2/src/tribler/core/components/tunnel/community/tunnel_community.py#L134-L161).

qstokkink avatar Apr 12 '22 14:04 qstokkink