Search code examples
network-programmingp2ppeerdecentralized-applications

Decentralized Peer to Peer


I am interested in a peer 2 peer decentralized network , I have tried using libraries like pyp2p which required a rendezvous and the likes of https://github.com/macsnoeren/python-p2p-network , since i am not deep in the computer networks domain , I have several questions to ask : Is it possible to solely communicate with a device only using IPV4 and An open port number without HTTP requests (DIRECT)? IS there a way to do this with socket programming and HTTP requests ? what libraries do you suggest that enable this functionality ? Is port forwarding necessary for systems like this or can it be bypassed? which library is best for developing decentralized peer to peer networks in the python language?


Solution

  • Is it possible to solely communicate with a device only using IPV4 and An open port number without HTTP requests (DIRECT)?

    Yes, however one issue with direct peer-to-peer is the existence of NAT devices in many networks that block incoming connections.

    IS there a way to do this with socket programming and HTTP requests ?

    Yes, just open a listening socket on one end, and connect to it from the other.

    what libraries do you suggest that enable this functionality ?

    This is outside the scope of Stack Overflow questions, but you don't really need any library to create or use sockets. They're provided by the operating system and can be used using the standard library of most languages.

    Is port forwarding necessary for systems like this or can it be bypassed?

    If there are NAT devices on the path between the peers, you'd need some way of traversing that NAT. Port forwarding is one way of doing that. Look into UPnP and STUN if you want something more automatic.

    which library is best for developing decentralized peer to peer networks in the python language?

    I honestly don't know. You'll need to do your own research.