Blockchain across Oracle
上QQ阅读APP看书,第一时间看更新

Peer-to-peer network and broadcast of data

You may have heard of BitTorrent, a peer-to-peer network where users share files among each other without a central server having control over the data. The network layer of a blockchain is similar to this, and it is also managed by a peer-to-peer network, which is an architecture for distributing data in a network. In the case of blockchain, it is a network in which nodes (peers) are interconnected and share data or tasks (resources) among each other. This is different to a traditional client-server model, where the centralized server holds 100% of the data and the client needs to trust that the data is legitimate.

A peer-to-peer network runs without the use of a centralized administration system to coordinate transactions. Rather, it sends or broadcasts transactions to each connected party in the network. Nodes can join or leave when they want. When a node joins or rejoins the network, all active nodes will then share all of the updates required to be in sync. These peers commonly find each other through a central index server, or by seeking other participants that use the same software through the internet. When a transaction is published to one of the peers in the network, that peer broadcasts the transaction and its data to all connected nodes in order to ensure that everyone is in sync with each other. Besides transactions, peers periodically generate blocks of verified transactions, which is part of the consensus mechanism, and they are broadcast in the same way.

A peer-to-peer network is, in some ways, less efficient than the client-server model, as the data is distributed and redundantly processed. However, each peer can operate independently, which makes the peer-to-peer network more scalable and robust. Since no central server controls the flow of data, it is harder to close down the network. Additional detail regarding this capability is presented in Chapter 3, Blockchain 101 – Assets, Transactions, and Hashes.