Peer-to-Peer Networks

Mar 15, 2023
Peer-to-peer (P2P) is a decentralized file-sharing technology that allows individual users to share files with each other directly. P2P technology also enables the distribution of data across an intranet, or within a private network. In order to share files, P2P networks use a combination of client programs and server programs that communicate directly with each other, instead of through a central server. This makes it possible for users who have never been connected to each other before to connect and exchange information over the Internet. Peers on these networks can be anyone who wants to share their resources, such as their disk space or bandwidth. When you use peer-to-peer (P2P) networks, you may find that some peers offer better performance than others. The performance differences depend on several factors:
  • The speed of your connection
  • Your Internet service provider (ISP)
  • The number of peers offering files at any given time.
In financial technology, Peer-to-peer (P2P) is a decentralized networking model where each party interacts directly with the other without relying on a central server. In the context of cryptocurrencies, this means that transactions take place between users directly, without an intermediary. The benefits of peer-to-peer cryptocurrency exchange include: A reduction in fees. Since there’s no intermediary to collect fees, the cost of transferring cryptocurrencies is significantly reduced. No risk of hacking or theft. There’s no central point of failure since there is no central server holding all the data related to your account and transactions. Faster transaction times. Without having to go through many intermediaries, it takes less time for your transaction to be confirmed on the blockchain network when using P2P exchanges compared to traditional ones where transactions require approvals from multiple parties before being added to the ledger.

How does P2P work?

Peer-to-peer (P2P) is a decentralized networking architecture that partitions tasks or work loads between peers. Peers are participants in the application who have the same rights and privileges. They are referred to as the nodes in a peer-to-peer network. The nodes in such a network are typically connected with each other via specialized software running on the computers they use, and they can also be connected by electrical cables. Peer-to-peer is a fully distributed topology where work is divided among participants with equal privileges, who are called peers. A peer can be any device with net access, including (but not limited to) PCs, tablets, mobile phones, servers, and routers. Peers make up the system's hash table, which maps the IP addresses of peers to their current hash values. Peers forward messages from other peers to their neighbors as well as send messages to them directly using broadcast addresses or point-to-point connections over TCP/IP connections. In this way, the network is built up until all target data has been reached.

Unstructured P2P networks

Unstructured P2P networks are the first generation of peer-to-peer networks and they are the most popular form of peer-to-peer networks today. Unstructured P2P networks have no structure in terms of how peers are connected to each other. Peers on an unstructured network can be connected to any other peer, regardless of their location or how well it performs. Because there is no structure or organization in an unstructured network, it is difficult for a user to find what they want when using an unstructured P2P network.

Structured P2P networks

Structured P2P networks are defined by their topology. A structured P2P network is a collection of nodes connected by edges. These nodes may be either peers or routers. The following section describes three types of structured P2P networks: overlay networks, geospatial networks, and DHTs. In an overlay network, every node knows about every other node in the system, and each node has a unique identifier that is used to identify it in messages between other peers. In a geospatial network, each peer knows its location relative to other peers in the system. In a DHT such as Chord or Kademlia (see the section called “Distributed Hash Tables”), every peer knows only about its closest neighbors — that is, those peers with whom it shares a common keyspace (which might be based on IP address).

Role of P2P in blockchains

Bitcoin is a peer-to-peer payment system and digital cryptocurrency developed in 2009 by pseudonymous developer Satoshi Nakamoto. The system's payments are tracked in a public ledger using its own unit of currency, also known as bitcoin. The US Treasury refers to bitcoin as a decentralized virtual currency because payments are peer-to-peer and don't require a single administrator or central repository. Media reports frequently refer to bitcoin as a cryptocurrency or digital currency, despite the fact that its legal status as money is in question. Bitcoin is sometimes accepted as payment for products and services online and offline. By hashing transactions into an ongoing chain of hash-based proof-of-work, the network timestamps transactions, creating a record that cannot be changed without redoing the proof-of-work. Each block contains a timestamp, and each block is linked to previous blocks in such a way that the previous block can be proved to have existed at the time it was supposed to have been created. Each block must also contain information about all transactions that took place during the time period when it was mined with a link to the previous block (which must itself have been mined in order to be valid).