network-programminglanguage-agnosticsocial-networkingp2pnat-traversal

I want to build a decentralized, reddit-like system using P2P. What existing p2p library should I base it on?


I want to build a decentralized, reddit-like system using P2P. Basically, I want to retain the basic capabilities of reddit, but make it decentralized, to make it more robust and immune to censorship. This will also allow people to develop different clients to match the way they want to browse it.

Could you recommend good p2p libraries to base my work on? They should be open-source, cross-platform, robust and easy to use. I don't care much about the language, I can adapt.


Solution

  • Disclaimer: warning, self-promotion here !!!

    Have you considered JXTA's latest release? It is probably sufficient for what you want to do. Else, we are working on a new P2P framework called Chaupal, but it is not operational yet.

    EDIT

    There is also what I call the quick-and-dirty UDP solution (which is not so dirty after all, I should call it minimal).

    1. Just implement one server with a public address and start listening for UPD.
    2. Peers located behind NATs contact the server which can read how their private IP address has been translated into a public IP address from the received datagrams.
    3. You send that information back to the peer who can forward it to other peers. The server can also help exchanging this information between peers.
    4. Then peers can communicate directly (one-to-one) by sending datagrams to these translated addresses.

    Simple, easy to implement, but does not cover for lost datagrams, replays, out-of-order etc... (i.e., the typical stuff that TCP solves for you at the IP stack level).